Hi All-

I am using Eclipse and trying to build a release version of a program I have written in ANSI C for a project. I am able to get it to build as a Debug version with just a couple of warnings but when I do a release version I get a lot more errors and no build. Here is the output from the full (release) version of the build:

**** Clean-only build of configuration Release for project UpdateSysState ****

make clean
rm -rf ./src/upd_sys_st.o ./src/upd_sys_st.d UpdateSysState


**** Build of configuration Release for project UpdateSysState ****

make all
Building file: ../src/upd_sys_st.c
Invoking: GCC C Compiler
gcc -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/upd_sys_st.d" -MT"src/upd_sys_st.d" -o"src/upd_sys_st.o" "../src/upd_sys_st.c"
In file included from ../src/upd_sys_st.c:22:
/usr/include/mysql.h:113: error: field ‘type’ has incomplete type
/usr/include/mysql.h:149: error: expected specifier-qualifier-list before ‘MEM_ROOT’
/usr/include/mysql.h:253: error: expected specifier-qualifier-list before ‘NET’
/usr/include/mysql.h:316: error: expected specifier-qualifier-list before ‘MEM_ROOT’
/usr/include/mysql.h:342: error: expected specifier-qualifier-list before ‘NET’
/usr/include/mysql.h:660: error: field ‘buffer_type’ has incomplete type
/usr/include/mysql.h:672: error: expected ‘)’ before ‘*’ token
/usr/include/mysql.h:673: error: expected ‘;’ before ‘void’
/usr/include/mysql.h:683: error: expected specifier-qualifier-list before ‘MEM_ROOT’
../src/upd_sys_st.c: In function ‘main’:
../src/upd_sys_st.c:97: warning: implicit declaration of function ‘my_init’
../src/upd_sys_st.c:98: warning: implicit declaration of function ‘load_defaults’
../src/upd_sys_st.c:196: warning: assignment makes integer from pointer without a cast
make: *** [src/upd_sys_st.o] Error 1

All the errors related to mysql.h I have no control over... They are part of the header file for MySQL that I need. The warnings are invalid, as these are functions used by mysql and should also be included... At least I am able to call them from a Debug version. Here is the output I get when I do that:

**** Build of configuration Debug for project UpdateSysState ****

make all
Building file: ../src/upd_sys_st.c
Invoking: GCC C Compiler
gcc -I/usr/include/mysql -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/upd_sys_st.d" -MT"src/upd_sys_st.d" -o"src/upd_sys_st.o" "../src/upd_sys_st.c"
../src/upd_sys_st.c: In function ‘main’:
../src/upd_sys_st.c:98: warning: passing argument 2 of ‘load_defaults’ from incompatible pointer type
../src/upd_sys_st.c:196: warning: assignment makes integer from pointer without a cast
Finished building: ../src/upd_sys_st.c

Building target: UpdateSysState
Invoking: GCC C Linker
gcc -o"UpdateSysState" ./src/upd_sys_st.o -lmysqlclient
Finished building target: UpdateSysState


Can anyone give me an idea of what might be causing this, or some options to make the compiler less anal-retentive here?

Thanks,
Eric