Getting Started: Beginning OpenGL

Started by
13 comments, last by BenMo 17 years, 9 months ago
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..
Advertisement
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
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

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.
Well, I never got the Chapter One project working, but the other Chapters seem to work fine as long as I load in all the files and list the right things in the linker. Thanks guys!

This topic is closed to new replies.

Advertisement