Saturday, December 27, 2014

C++ Builder glut.h error: One set of overloaded "c" functions


1) Add the following lines :

#include <stdlib.h> //bring exit into global scope
#endif //ERIC CHANGE

Just above the lines:
#endif /* _WIN32 */

#include <GL/gl.h>
#include <GL/glu.h>
Around line 133 in glut.h(atleast in the one I have)

2) Then change line 146 in glut.h or the line that declares the extern _CRTIMP void __cdecl exit(int);
with the following:

//in borland this function is not extern C.
//stdlib.h is included somewhere above 
extern _CRTIMP void __cdecl exit(int);

1 comment:

phpMyAdmin 無法存取 MariaDB 10 的解決方法