From: Dzonatas <dzo...@dz...> - 2007-03-13 21:35:05
|
I found what caused undefined references. (in re "glGetDoublev") There was some code included from an APR module: #ifndef __attribute__ #define __attribute__(__x) #endif The compiler didn't warn that __attribute__ got redefined. That code led to APIENTRY to get redefined also without any warning. That caused the gl headers to define APIENTRY calls without __stdcall decorations. That caused the many gl link errors. Here is an example of the code. This command will show you what happened to the decorations: $ i686-mingw32-g++ tmp.c -E | grep test_f with this source: //-------- no headers __stdcall void test_f_before( void ) ; #ifndef __attribute__ #define __attribute__(__x) #endif __stdcall void test_f_after( void ) ; int main() { return 0; } //--------- |