Click here to Skip to main content
15,887,946 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I do:
C++
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
  Vio *vio;
  unsigned char *buff,*buff_end,*write_pos,*read_pos;
  mysql_socket fd;	

I get in intelliSense: identifier "mysql_socket" is undefined
c:\program files\mysql\mysql server 5.5\include\mysql_com.h

I'm using Visual Sturio 2010 with Windows 7. What would cause this error?
Posted
Updated 7-May-11 8:03am
v2

1 solution

It's looking for a type 'mysql_socket' and can't find it defined anywhere. Where do you think it is defined?

Have you included all necessary header (.h) files to set up the definitions required for the MySQL API? You may need more than just mysql_com.h.

Also, I'm not familiar with that API, but a quick search for mysql_socket on Google suggests that you might need MYSQL_SOCKET instead - capitalisation matters in C/C++/C# and related languages.

Hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900