PDA

View Full Version : DEV-C++ Errors On All PhotoTypes...



ComputerNerd8888
08-01-2003, 06:58 PM
Hi,

I am friarly new to C++ and OpenGL... Though I know a good deal.. I have never had this problem before and now it happens every time...

I get errors similar to:
1142 C:\Dev-Cpp\include\gl\gl.h
syntax error before `void'

for all the gl.h and the glu.h header files... I did not touch these files... It dose it on all the DEV-C++ compilers... When the code is compiled on VC6 compiler it dose not get these erroes...

Yes I have linked the librays...

Please any help would be grate full!

Thanks,
Andrew

mikael_aronsson
08-01-2003, 10:03 PM
Hi !

Ohhh mighty Bill !!!!!

Mr Gates likes to mess up our lives all the time, try to include windows.h before you include gl.h, that should do the trick.

Microsoft has put a lot of windows specific declarations in their gl.h so you must include windows.h to make it work.

Mikael

ComputerNerd8888
08-02-2003, 04:13 PM
Thanks!!! That worked...

But I though OpenGL worked on alll OS...

What do I do if I am codeing for Linux?

Thanks,
Andrew

JanHH
08-02-2003, 08:15 PM
when coding with linux, don't include windows.h.

*g*

sorry.. you can simply include gl.h and start, once you have something to render on, to get this, you probably need motif and/or xlib, there are some tutorials, it's quite easy.

Jan

JanHH
08-02-2003, 08:17 PM
or glut, of course, although I would not recommend it.

Gavin
08-05-2003, 03:49 AM
#ifdef __windows
#include <window.h>
#endif