Using GLUT with a free compiler under Windows

Anyone managing to use GLUT with a free compiler under Windows?

I’m getting the following sort of errors no matter the compiler :

d:\myopengl\hello\main.o(.text+0x17):main.c: undefined reference to __glutInitWithExit' d:\myopengl\hello\main.o(.text+0x33):main.c: undefined reference to__glutCreateWindowWithExit’
d:\myopengl\hello\main.o(.text+0x57):main.c: undefined reference to __glutCreateMenuWithExit' d:\myopengl\hello\main.o(.text+0x81):main.c: undefined reference to_imp__glClear’

I’m using the latest bin version of GLUT (3.7.6 - http://www.xmission.com/~nate/glut.html)..)

I can compile standard OpenGL programs without problems from the Dev-C++ 4 IDE (Cygwin compiler) but get the error above with a GLUT/OpenGL program I know to be working.

Any help welcome as I really want to get coding

Thanks a lot.

Tsyrak

It seems like you are not linking your glut32.lib

I have not personally tested it, but I doubt that the glut32.lib you get from the xmission page will work with your compiler since it is made for VisualStudio.
You would have to find out how to make the glut32.lib with your compiler so that you can then link it…

Yes, I’ve put my hands on version 3.6 of GLUT for Windows meantime, thanks…

I still have the same sort of errors though. How do I get about telling the compiler to link to glut? :stuck_out_tongue:

I have had no problems using lcc-win32 with glut.
It is a nice free C/C++ compiler.

Originally posted by Tsyrak:
[b]Anyone managing to use GLUT with a free compiler under Windows?

I’m getting the following sort of errors no matter the compiler :

I’m using the latest bin version of GLUT (3.7.6 - http://www.xmission.com/~nate/glut.html)..)

I can compile standard OpenGL programs without problems from the Dev-C++ 4 IDE (Cygwin compiler) but get the error above with a GLUT/OpenGL program I know to be working.

Any help welcome as I really want to get coding

Thanks a lot.

Tsyrak[/b]

lcc-win32 is C++ now? I thought it was only C.

It is C but has some C++ extensions like iostream library, operator overloading and references (&).

Found the fix to my problem - now using Dev-C++, GLUT libs for it here : http://www.cs.uofs.edu/~mpc3/cmps370/glutsetup.html