Reputation:
I have written a simple code to test my Eclipse. In the program I do not get any error but when I build the program I get the following error message :
Upvotes: 0
Views: 141
Reputation: 43379
There is a hack in GLUT, referred to as "ATEXIT_HACK". It is designed to workaround issues related to using different Visual C++ Runtime library linker options between the GLUT DLL and your application.
This hack should not be used with MinGW since it has its own C standard library, it is only necessary in Microsoft Visual C++. Unfortunately, the GLUT library tries to apply this hack anytime _WIN32
is defined irrespective of the compiler used.
#include <glut.h>
:#ifndef _MSC_VER
# define GLUT_DISABLE_ATEXIT_HACK
#endif
Since you are using Eclipse, it should also be possible to add this pre-processor definition as a project option, but I could not tell you how to do that.
Upvotes: 4