A small problem with lesson 7 in the games section
I have a small problem with the lesson 7 in the games section. I downloaded the SDL version and tried to build it in VC++. I know it was meant for Linux, but i figured that it would work in VC because it was using basic system calls and none of the windows specific calls. So I load it up in a new project and when I try to compile it I come up with these errors:
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing '';'' before type ''void''
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2501: ''WINGDIAPI'' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found
These errors occur with every .cpp file in the code. I was wondering if I shouldn''t try to load this in VC++ or if I was doing something wrong with compiling it.
Thanks for any help.
you should include the opengl libraries...
either you add them manually to the linker in vc++ or you
type in this in the beginning of your program:
either you add them manually to the linker in vc++ or you
type in this in the beginning of your program:
#pragma comment(lib, "opengl32.lib")#pragma comment(lib, "glu32.lib")#pragma comment(lib, "glaux.lib")
I tried that after I got the message and I even copy/paste to the program but no joy. Any other ideas? I tried it on a linux system and it worked fine so the program works in linux. But I can''t figure out what the problem is in VC++.
These are COMPILER errors, not LINK errors.
#include <windows.h> before gl.h in each source file.
#include <windows.h> before gl.h in each source file.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement