Jump to content
  • Advertisement
Sign in to follow this  
Aidamina

Got some errors and dont know what to do about it

This topic is 4997 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, This is the problem, I'm making a program with VC++ 2003, which will connect to a remote mysql server using the mysql C api. I think i've included the right directories / libs, but it keeps sending me build errors. At first i thought i should add the winsock2.h and the wsock32.lib, but that will result in 100+ build errors for some reason. The errors i have now, return from mysql_com.h: f:\mysql-4.1.7-win\include\mysql_com.h(304): error C2065: 'SOCKET' : undeclared identifier f:\mysql-4.1.7-win\include\mysql_com.h(154): error C2146: syntax error : missing ';' before identifier 'fd' f:\mysql-4.1.7-win\include\mysql_com.h(154): error C2501: 'st_net::SOCKET' : missing storage-class or type specifiers f:\mysql-4.1.7-win\include\mysql_com.h(154): error C2501: 'st_net::fd' : missing storage-class or type specifiers f:\mysql-4.1.7-win\include\mysql_com.h(304): error C2146: syntax error : missing ')' before identifier 's' f:\mysql-4.1.7-win\include\mysql_com.h(304): error C2059: syntax error : ')' they are about these two lines: my_socket fd; and int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen, unsigned int timeout); I've been trying for days now to get the C api to work, but i havent made a single successful connection with the server yet please help im desperate! Greetz,

Share this post


Link to post
Share on other sites
Advertisement
It seems you need to include some other header before mysql_com.h:
[edit]

#include <windows.h>
#include <Winsock2.h>
#include <mysql.h>
#include <mysql_com.h>


[/edit]
Would the above work?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!