I ran across these errors not too long ago trying to compile with MinGW.. Googled it and found this: http://www.mingw.org/MinGWiki/index.php/Glut?PHPSESSID=54cdd9e3099a2a6b87d403eed
Assuming all of your include directories, and lib directories are correct and you're including the glut lib, then before your #include "glut.h" place the following defines
#define _STDCALL_SUPPORTED
#define _M_IX86
It fixed the problem for me..
Getting Started: Beginning OpenGL
I've already included glut32.lib in my linker, along with everything else that Artum listed in the post above.
When I try to put in the two #define lines you suggested, I get more errors in addition to the previous ones I listed, and it highlights the #include <windows.h> line...
9:1 C:\Dev-Cpp\OpenGL\Simple\Simple.cpp [Warning] "_M_IX86" redefined
28:1 C:\Dev-Cpp\include\windows.h [Warning] this is the location of the previous definition
When I try to put in the two #define lines you suggested, I get more errors in addition to the previous ones I listed, and it highlights the #include <windows.h> line...
9:1 C:\Dev-Cpp\OpenGL\Simple\Simple.cpp [Warning] "_M_IX86" redefined
28:1 C:\Dev-Cpp\include\windows.h [Warning] this is the location of the previous definition
Hmmm. I wonder why it's pulling up a warning on windows.h? You're building this as a console application right? As for the warnings on the defines, you can simply do:
#ifndef _STDCALL_SUPPORTED
#define _STDCALL_SUPPORTED
#endif
#ifndef _M_IX86
#define _M_IX86
#endif
#ifndef _STDCALL_SUPPORTED
#define _STDCALL_SUPPORTED
#endif
#ifndef _M_IX86
#define _M_IX86
#endif
I've tried it as a windows application and as a console application, with the same linker errors for both. Adding in your defs seemed to have no effect.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement