Cannot open include file: 'mysql.h' Problems with including static lib and head

Posted by Magrbot on Fri 29 Nov 2002 03:48 PM — 3 posts, 13,724 views.

#0
I know this is so basic but I cant seem to get my Static library made. The book I learned from told me to create a directory in C:\ and create folders then place the files needed in them. I dont know what files these are.. Well anyways it gave me the files I need on CD with a static lib and everything but I dont know how to include it. I did everything it says but it always gives me this 1 error

Compiling...
main.cpp
c:\library\include\defs.h(4) : fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
Error executing cl.exe.

main.obj - 1 error(s), 0 warning(s)

My source code is...
#include <iostream>
#include <iomanip>
#include <mysql++>

int main(void)
{
//Create a connection to the database
Connection Con("gamedata","127.0.0.1");

//Create a query object that is bound to our connection
Query query = con.query();

//Assign the query to that object
query << "Select * From paymentinfo";

//Store ressults from then query
Result res = query.store();

//Display the results to the console



//Show the field headings
cout.setf(ios::left);
cout << setw(6) << "id"
<<setw(10) << "playerid"
<<setw(20) << "datapaid"
<<setw(20) << "type"
<<setw(20) << "amount" <<end1;

Result::iterator i;
Row row;
//The result class has read-only random access iterator
for (i = res.begin(); i != res.end(); i++)
{
row = *i;
cout << setw(6) << row["id"]
<< setw(10) << row["playerid"]
<< setw(20) << row["datapaid"]
<< setw(20) << row["type"]
<< setw(20) << row["amount"] << end1;

}

return 1;

}
#1
I really didnt know where to put this.. but im sure somebody knows what to do.

Well if anyone can help please contact me because I cant sit here all day.

AIM: XsupremebasharX
msn: majora288@hotmail.com

I would greatly apreciate any help. thank you
Amended on Fri 29 Nov 2002 03:59 PM by Magrbot
Australia Forum Administrator #2
This is really nothing to do with compiling the SMAUG server, but anyway, it sounds like you don't have the file mysql.h which would probably come with the MySQL distribution. I suggest www.mysql.org to get a copy of that.