compiler misconfiguration?

I have windows.h before anything else. i have the libraries included before kernal32 in the compiler and i am making a win32 application, NOT a console application. I’ve tried using several peoples code from this site but their code gets the same errors. these are the 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
Error executing cl.exe.

i feel like im missing just some simple step
please post anything that might be useful.

You posted pretty much the exact same question here…
http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/003301.html

And got the correct response. You say you have windows.h before anything else, but you obviously missed a spot somewhere or you wouldn’t be getting this error.

While VC++ is compiling it tells you which .cpp (or .c) file it is compiling. Check the source file that is compiling at the time you get the error and make sure that you don’t have GL/gl.h included somewhere before windows.h.

It doesn’t matter what order the libraries are included in the project… It does matter what order headers are included becuase .c/.cpp files are compiled from top down so if something isn’t defined before it is used (which is EXACTLY what this error is telling you), you’re going to get the compiler upset.

So far as Win32 console vs. Win32 Application, typically console is used with Glut, non-console is used when you do your own window creation. The only real difference is the function that is used as the entry point (main vs. WinMain) and the fact that the console will, well… create a console.