I'm new to C++ graphics, and a friend tipped me off to OpenGL. I'm currently trying to work with the GL Utility Toolkit ( #include gl\glut.h
), which I had to download from the web. Due to all the download sites being intended for people with older versions of Windows (I think), I had to install the *.h, *.o, and *.dll files by hand, but going with the locations specified by the readme that came with the download (from http://www.xmission.com/~nate/glut.html).
However, whenever I try to work with glut.h, I get a cartload of linker errors that yell at me about an undefined reference for any number of functions. Sample: " [Linker error] undefined reference to `__glutInitWithExit@12' ". I am using Bloodshed Dev-C++ version 4.9.9.2.
Please help!!!
Recommended Answers
Jump to PostI just downloaded the source and compiled with VC++ 2005 Express with no problems using the project that was supplied with the source code. Is it the GLUT source code that you compiled or some file that you wrote?
>>I had to install the *.h, *.o, and *.dll files …
Jump to PostThose errors mean you did not add the glut32.lib to your project. If you have added it but still get the errors post your program and I'll give it a try.
Jump to PostThat library was build with VC++ 6.0 compiler. The *.lib file is apparently not compatible with Dev-C++ because it wants a *nix-like filename, such as libglib32.a I created a simple c++ project and just added glib.h then compiled. Got the same errors you reported. I tried to add glut32.lib but …
All 9 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.