View Full Version : Devcpp & opengl?
04-08-2005, 04:05 AM
Can anybody mention only ONE compiler that compiles ALL openGL programs? For example, I tried to compile one with MingW, and I got a lot of errors:
[Linker error] undefined reference to `gluPerspective@32'
[Linker error] undefined reference to `gluNewQuadric@0'
[Linker error] undefined reference to `gluCylinder@36'
[Linker error] undefined reference to `gluSphere@20'
[Linker error] undefined reference to `gluDeleteQuadric@4'
And so on...
Also when I find an example that was made not with the compiler I use, how can I make it run???
Or did I forget to include some libraries in the project info?
04-08-2005, 04:44 AM
As the error message says, it is not a compiler error but a linker error, and in your case it is an error indicating that you have not included the correct libraries to the linker options, these are the -lgl -lglu and so on, not sure how you do that with devcpp though, it is also important that you put the libraries in the correct order, usage before implementation.
In your case you have not included the glu library (-lglu).
04-08-2005, 09:20 AM
look at the mingw site they offer a great deal of help and if I do remember correctly one is a able to choose an opengl project from the wizard
04-08-2005, 10:24 AM
give http://nehe.gamedev.net a look, it will help you get started
04-10-2005, 05:27 AM
glut library is not included in minGW. You have to download a freeware or opensource version of it and link it.
GLUT by Mike Robbins (win 3 porting) (http://www.xmission.com/~nate/glut.html)
I'm currently trying and installing it, too. I'm using DEV-C++ 22.214.171.124. I'll post the results of my experiments. Bye!
P.S. Try this (http://www.nigels.com/glt/devpak/) also: it looks fine for Dev-C++ users.
04-11-2005, 12:01 AM
Thanks. But I still have one question:
Many of the examples I found on the net are using functions like "aux...()". I think it needs another library because I get some errors in the case of these examples. If anybody knows where I can find it, please let me know.
04-11-2005, 12:14 AM
I guess that is the auxiliary library try to look for glaux or something similar
04-11-2005, 12:18 AM
Ok, I'll have a look. And about the Glut... I found something called "glut for win32". And it looks like a quite official release. Will it work with devcpp or should I try that "devpak"?
04-11-2005, 12:27 AM
Eh...that OpenGlut.devpak or sg similar...is it just me or Windows really doesn't know that file format?
04-11-2005, 07:02 AM
I use Dev-C++ and OpenGL and it works just fine.
You do need to download the opengl files though.
You don't really need the devpack. You just need to know where to stick the files in the Dev-C++ directory.
As for the file extension .devpack, I don't think it's Windows trying to recognize the filetype. Only dev-c++ needs to recognize it so it can use the file.
To link files to your project, you must first make a blank project.
Add your source code files to the project.
This allows you to go into the toolbar at the top where it says Project. Then click Project Options at the bottom of the pop-up menu (you can also just hit alt + p)
A window will appear and it will ask for linker options at the bottom of this new window. There you can link the files by:
-lopengl32 -lglu32 -lglaux -lglut32
Hope all this helps out.
04-12-2005, 05:17 AM
Thats ok but where can I find that GLAUX library???
04-12-2005, 02:34 PM
Totally new to OpenGL and GLUT. Want to develop game programs. Good at C++ now and some windows. What is a good place to start learning OpenGL and GLUT? I use MS C++ 6.0 compiler.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.