PDA

View Full Version : need help with GLUT



richie
06-22-2005, 08:11 AM
Hi,

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:

Compiling...
hello_source.cpp
Linking...
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!

Cheers

Richie.

publicENEMY
06-22-2005, 02:36 PM
what version of your glut? try http://www.xmission.com/~nate/glut.html

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.

t3jem
06-23-2005, 05:34 AM
You can also download a good version here http://programminghq.tk/ 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.

06-23-2005, 08:15 AM
Hi,
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!

richie

06-23-2005, 08:17 AM
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...

richie