Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Compiling the server ➜ Cannot open include file: 'mysql.h' Problems with including static lib and head

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

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Magrbot   (2 posts)  Bio
Date Fri 29 Nov 2002 03:48 PM (UTC)
Message
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;

}
Top

Posted by Magrbot   (2 posts)  Bio
Date Reply #1 on Fri 29 Nov 2002 03:53 PM (UTC)

Amended on Fri 29 Nov 2002 03:59 PM (UTC) by Magrbot

Message
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
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 01 Dec 2002 09:05 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


13,142 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.