View Full Version : GLUT Problem
12-21-2003, 06:35 PM
I'm a newbie, and I hope someone can help me out. I'm using devcpp on a windows 98 machine and I'm trying to use glutSolidSphere to draw a sphere. I'm getting an error that says
[Linker error] undefined reference to `glutSolidSphere@16'. I have included GL/glut.h and the glut.h header is in my devcpp/include/ folder. I have also made sure and glut32.dll is in the windows/system folder and libglut32.a is in the devcpp/lib folder. What else do I need to do to make sure that programs using glut will compile with devcpp? Thanks in advance for your time.
12-25-2003, 09:46 PM
You also need to link with glut32 (i.e. -lglut32). Not sure how to do it under DevC++, but similar to how you link opengl32 & glu32, for instance.
12-26-2003, 07:35 AM
Yep, that's the step I forgot. Works like a charm now. For anyone reading this thread wondering how to do this in Devcpp, just go to Project->Project Options (or press Alt+P), then go to the Parameters tab, click on "Add Library or Object" near the bottom left corner, browse until you find libglut32.a, and click "Open." This should get your glut programs compiling. Thanks Marcus.
01-09-2004, 11:24 AM
i am also having a comiling problem with glut. i am using borland and whenever i compile (i type in "bcc32 framework.cpp glut32.lib" to compile the program) i get the usual warnings, and everything goes ok, but then i get this error at the bottom
ERROR: 'C:\BORLAND\BCC55\LIB\GLUT32.LIB' CONTAINS INVALID OMF RECORD, TYPE 0X21 (POSSIBLY COFF)
i cant figure out what i am doing wrong,could someone ples help, thanx
01-11-2004, 04:45 AM
This is a known issue when using lib-files that weren't created by a borland compiler. borland uses a different format for it's lib-files (namely OMF). This is different from Microsoft's version, which is COFF.
Borland provides a small command line tool called coff2omf.exe which should be located in the \bin directory of your borland compiler.
just run the tool on your glut32.lib file and use the result to link with your program. Should work fine.
01-11-2004, 07:42 AM
01-28-2004, 04:24 AM
I also have a problem using glutSoliSphere() with a material. I am wondering if this funciton uses texture coordinates. When I bind a texture and call this function I still see a uniform sphere whereas another mesh (with properly defined texture coordinates) is well textured...
any ideas? :-\
02-09-2004, 06:59 PM
Hi. I also use Dev C++ (Dev C++ 4). I made a project, and I tried to link GLUT. It didn't work for me.
I get the following Linker Errors:
"g++: c:\documents and settings\malcolm\my documents\test\glut test\test.o: No such file or directory"
"g++: file path prefix `C:\DEV-C_~1\Bin\' never used"
http://www.opengl.org/discussion_boards/ubb/confused.gif I have no clue what to do now. I don't have a file called test.o, by the way. http://www.opengl.org/discussion_boards/ubb/confused.gif
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.