![]() |
| | #1 |
| Registered User Join Date: Jul 2008
Posts: 3
| 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 |
| estebbins is offline | |
| | #2 |
| Registered User Join Date: Jul 2008
Posts: 3
| OK, looking at the compiler commands, it looks like the release version is not looking for the libraries that are included with the debug version... As well as the optimization is different. I would still appreciate any thoughts. -E |
| estebbins is offline | |
| | #3 |
| Registered User Join Date: Jul 2008
Posts: 3
| Nevermind, got it working. Nice forums though, I will remember this. -E |
| estebbins is offline | |
![]() |
| Tags |
| build, compile, incomplete, linker, type |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem in compiling targa2.c: error: field `ip' has incomplete type.. | Moony | C Programming | 0 | 03-20-2008 07:59 AM |
| Question on l-values. | Hulag | C++ Programming | 6 | 10-13-2005 04:33 PM |
| Dikumud | maxorator | C++ Programming | 1 | 10-01-2005 06:39 AM |
| Dynamic array of pointers | csisz3r | C Programming | 8 | 09-25-2005 02:06 PM |
| pointer to array of objects of struct | undisputed007 | C++ Programming | 12 | 03-02-2004 04:49 AM |