PDA

View Full Version : Using GLUT with a free compiler under Windows



08-18-2002, 01:53 PM
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 http://www.opengl.org/discussion_boards/ubb/frown.gif

Thanks a lot.

Tsyrak

Miguel_dup1
08-18-2002, 02:17 PM
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...

08-18-2002, 03:13 PM
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? :p

nexusone
08-18-2002, 03:43 PM
I have had no problems using lcc-win32 with glut.
It is a nice free C/C++ compiler.


Originally posted by Tsyrak:
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 http://www.opengl.org/discussion_boards/ubb/frown.gif

Thanks a lot.

Tsyrak

*Aaron*
08-18-2002, 04:47 PM
lcc-win32 is C++ now? I thought it was only C.

Pa3PyX
08-19-2002, 09:22 PM
It is C but has some C++ extensions like iostream library, operator overloading and references (&).

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