#### Archived

This topic is now archived and is closed to further replies.

# A small problem with lesson 7 in the games section

This topic is 5723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites
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:

#pragma comment(lib, "opengl32.lib")#pragma comment(lib, "glu32.lib")#pragma comment(lib, "glaux.lib")

##### Share on other sites
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++.

##### Share on other sites
These are COMPILER errors, not LINK errors.
#include <windows.h> before gl.h in each source file.

##### Share on other sites
Well, I did that and it seemed to compile just fine but then I get a smuck load of linker errors. And they seem to be complaining about the SDL stuff like ticktimer and such.

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633768
• Total Posts
3013750
×