GNOME Bugzilla – Bug 307549
libgda-1.3.3 build fails: compiler flag, -Ddebug=1, conflicts with mysql.h function prototype
Last modified: 2005-06-18 13:35:31 UTC
Version details: 1.3.3 Distribution/Version: Yellow Dog Linux 4.0.1 mysql-4.1.12: <mysql.h> contains the function prototype void STDCALL mysql_debug(const char *debug) The compiler flag, -Ddebug=1, results in a macro substituion: void STDCALL mysql_debug(const char *1) which causes gcc [3.3, 3.4.1, 4.1] to choke. A quick and dangerous workaround: Alter the function signature in <mysql.h>. For example, void STDCALL mysql_debug (const char * mysqldebug) A better solution is to modify the name of the compiler substitution MACRO to something unique to libgda, say, -DGDA_DEBUG=1
./libgda/gda-config.c appears to be the only file that contains #ifdef debug so the switch to more uniquely named compiler preprocessor flag is simple to implement. -Joseph
Fixed in CVS, now we use GDA_DEBUG