www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - mySQL: setting up a build

↑ ↓ ← "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
↑ ↓ → 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