need help with GLUT


I was hoping you could help me out with this problem im having…

I’m learning OpenGL, using GLUT because I don’t know the Windows API, but I can’t get it to work. I get the following compile error:

LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/hello.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I copied the glut32.dll into %windir%\system folder
I copied glut.h into include/gl
I copied glut.lib into lib

I did notice the file glut.def, but no idea where its supposed to go!?!?!

When reading the help files, it said that I had to compile the dll file, but there was no glut.dsw project file…

So I just copied the glut32.dll that was already in the archive file…

Please help me!

Thanks very much!



what version of your glut? try

it is correct that you ignore the .def file.

what is your compiler? version? the original project was compiled under what compiler?

if you can clarify this, im sure there are peoples who can help you.

You can also download a good version here then goto downloads/OpenGL. but the unresolved external WinMain is something I see in win api programs. In a win api program WinMain replaces the main function. You think you can post the code that is in your main function, because if you learned a little win api while learning glut and you used it then that may be your problem.

I’m using the same version as the link you provided…

I’m compiling with Visual C++ 6.0.

I hope you can help me! Thanks!


Oh, sorry I don’t know what compiler that version was compiled on, but I know it was VC++, but must have been v 6 because the latest GLUT version was released in 2002…