www.digitalmars.com         C & C++   DMDScript  

c++ - mySQL: setting up a build

reply "Ben Jones"<ben.jones infosis1.com> writes:
Seems that I am not even that far yet (link error.) I am using the C API of
mySQL and have no trouble within VC++. Yet with DMC++, I get syntax erors within
the mysql headers: example

sc test.cpp -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 -Ic:\mysql\include
-otest.obj 
Error: c:\mysql\include\mysql_com.h(118): ';' expected following declaration of
struct member
Lines Processed: 936  Errors: 1  Warnings: 0
Build failed

Specifically, not recognizing typedefs that it should namely, my_socket fd;
[offending line in mysql_com.h]

So, what obvious thing did I miss? 

Ben
Mar 16 2003
parent Richard Grant <fractal clark.net> writes:
In article <b53hc4$157u$1 digitaldaemon.com>, Ben Jones says...

Error: c:\mysql\include\mysql_com.h(118): ';' expected following declaration 
This may be caused by SOCKET being undefined, like: #define B b_B typedef struct a_A { B b; } A; int main() { A a; } The macro __LCC__ is not defined, and so socket.h is never included. You can use -D__LCC__=1 or equivalent. My guess is that VC++ has __LCC__ defined. Richard
Mar 17 2003