VC++ won't compile project if multiple .cpp files have #include"gl/gl.h"

does anyone know what i’m doing wrong?

#include <gl/gl.h>

int main()
{
	return 0;
}

class stuff
{
void stu();
};

#include "stuff.h"
#include "gl/gl.h"
void stuff::stu()
{
}

3 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

[This message has been edited by grady (edited 07-02-2001).]

If you used a project wizard to create the project, you just need to include stdafx.h at the beginning of every cpp file. The error you are getting is because windows.h has not been included. Stdafx.h includes that and other common headers.

Why do these crazy wacky people create header files with references to symbols that they don’t automagically pull in? I’m not a windows coder, but I see people post questions about missing symbols, and the answer always is ‘#include<windows.h>’ before ‘#include<GL/gl.h>’. Come on, fellas of the Gl/gl.h. WHy not include windows.h yourself? Its just… perplexing. With judicious use of #ifndef \ #define you don’t have to worry about multiply defined references.

Soryr, just a rant. Nothing to do with OpenGL or this thread of life in general. But, gees…

cheers,
Jawn

Thanks alot. I’m not crazy after all.

er, no. just clarifying; the people who write #include files without referencing all the symbols they use are the guys I’m talkin’ about; not you, the end user of the header file =)

cheers,
John

Yes i know what you met LOL. I was talking to Dfrey

[This message has been edited by grady (edited 07-02-2001).]