View Full Version : Compiling programs with OpenGL & GLUT with VC++6

01-14-2002, 12:22 AM

I didn't manage to compile under W2k my school project.
VC++6 found errors into gl.h
" WINGDIAPI " is not recognized
I've tried to delete all the WINGDIAPI, and then the errors are
I've tried to delete all the APIENTRY, ant then the errors are in winnt.h where some strut are declared without name..

What is the good way to compile ? are there particular settings ?

Thanks for reading and/or replying

01-14-2002, 01:23 AM
Well, I'm not running Win2K, but I am using VC++ 6.0 so the approach should be the same. When setting up a glut application I do the following:

Go to the "File" menu and pick "New". Select the "Project" tab and select "Win32 Console application". It's important that you don't choose "Win32 Application". If you do that you will get the exact link error you are talking about so that may be your problem. Next got to the "Project" menu and pick "Settings". Click the link tab and add "Glut32.lib" in the field where it says "Object/library modules". Click O.K. and you should be all set.

Hope this helps

01-14-2002, 03:01 AM
Thank You very much !!

It works now !!
I didn't specified win32 application, and for the WINGDIAPI error, I had to include glut.h before gl.h ( even in files using only opengl )

One more time Thanks for your answer

01-14-2002, 06:04 AM
gl.h requires that windows.h is included first, GLUT does this automatically for you, but if you don't use GLUT you'll have to include windows.h manually.

01-14-2002, 07:40 AM
Thanks you too, I understand now what happened