PDA

View Full Version : Getting openGL working in VS6



Johnn
05-23-2004, 02:45 PM
I opened some code from an opengl book cd and it ran fine. I copied the code and pasted in my project (it was only a simple main.cpp) but now I get 3 errors:

Compiling...
Robot.cpp
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
Error executing cl.exe.

Those errors points to (gl.h line 1152)

WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);

Im really clueless on whats wrong here... Any help would be truely appreciated!

dorbie
05-23-2004, 05:00 PM
You are missing the windows include file.

Start by including <windows.h>

05-24-2004, 05:27 AM
windows.h is the first include in my code...

Johnn
05-24-2004, 05:51 AM
Ahh found the bug! In my main, everything was fine... its in my class .h that I wasnt including windows.h!