using GLUT with dev-C++
i cant get glut to work with dev-c++. i used the glut.3.7.6+.DevPak to autoinstall everything, and i've checked everything seems to be in the right place, but when i try and compile i get a about a hundred linker errors, "undefined reference to blah". any ideas whats wrong? thanks
You need to start linking the GLUT library into your program, that's what it sounds like to me.
i've put:
-lopengl32 -lglu32 -lglut32
in project options/parameters/linker. is there something else i need to do? sorry i'm not really sure i understand this linking business yet!
-lopengl32 -lglu32 -lglut32
in project options/parameters/linker. is there something else i need to do? sorry i'm not really sure i understand this linking business yet!
Alright, try this:
-Open Dev-CPP
-Go to Tools->Package Manager
-Select your glut devpak and press remove.
-Download the New Dev-Pak Here
-Make sure all running instances of Dev-CPP are closed. Then double clicky the new glut devpak.
-After that has finished installing open Dev-CPP go to File-New->Project.
-Select the Multimedia Tab.
-Start the Glut project.
-Compile it.
There, try that, that's what I did and it worked nice. Any problems just say so and we'll work from there. See Ya'
-Open Dev-CPP
-Go to Tools->Package Manager
-Select your glut devpak and press remove.
-Download the New Dev-Pak Here
-Make sure all running instances of Dev-CPP are closed. Then double clicky the new glut devpak.
-After that has finished installing open Dev-CPP go to File-New->Project.
-Select the Multimedia Tab.
-Start the Glut project.
-Compile it.
There, try that, that's what I did and it worked nice. Any problems just say so and we'll work from there. See Ya'
yeah its works now, great!
i'd never seen that multimedia tab before, my textbook said to start a new console project??
thanks!
i'd never seen that multimedia tab before, my textbook said to start a new console project??
thanks!
Hmmm..I did the very same thing and I'm getting tons of linker errors...what files were supposed to be in the devpak? I ran a check and it said that some of the files were missing.
orcfan32: Can you copy the linker errors into here, so I have a little more to go on as far as what's wrong.
Ok, but there are a lot of em. I''l put them in a code box to save some space:
It is a multimedia project and it has all of the linker parameters. (I think thats what they're called...) If you need them, here they are:
-lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32
BTW, I tried to compile the multimedia project, none of it was modified.
main.o(.text+0x11e): In function `Z7displayv':C:/Dev-Cpp/main.cpp:41: undefined reference to `glutGet'main.o(.text+0x1f0):C:/Dev-Cpp/main.cpp:51: undefined reference to `glutSolidSphere'main.o(.text+0x280):C:/Dev-Cpp/main.cpp:58: undefined reference to `glutSolidCone'main.o(.text+0x31c):C:/Dev-Cpp/main.cpp:65: undefined reference to `glutSolidTorus'main.o(.text+0x3aa):C:/Dev-Cpp/main.cpp:72: undefined reference to `glutWireSphere'main.o(.text+0x43a):C:/Dev-Cpp/main.cpp:79: undefined reference to `glutWireCone'main.o(.text+0x4d6):C:/Dev-Cpp/main.cpp:86: undefined reference to `glutWireTorus'main.o(.text+0x4e0):C:/Dev-Cpp/main.cpp:89: undefined reference to `glutSwapBuffers'main.o(.text+0x554): In function `Z3keyhii':C:/Dev-Cpp/main.cpp:117: undefined reference to `glutPostRedisplay'main.o(.text+0x561): In function `Z4idlev':C:/Dev-Cpp/main.cpp:123: undefined reference to `glutPostRedisplay'main.o(.text+0x5a4): In function `main':C:/Dev-Cpp/main.cpp:141: undefined reference to `glutInit'main.o(.text+0x5b8):C:/Dev-Cpp/main.cpp:142: undefined reference to `glutInitWindowSize'main.o(.text+0x5cc):C:/Dev-Cpp/main.cpp:143: undefined reference to `glutInitWindowPosition'main.o(.text+0x5d8):C:/Dev-Cpp/main.cpp:144: undefined reference to `glutInitDisplayMode'main.o(.text+0x5e4):C:/Dev-Cpp/main.cpp:146: undefined reference to `glutCreateWindow'main.o(.text+0x5f0):C:/Dev-Cpp/main.cpp:148: undefined reference to `glutReshapeFunc'main.o(.text+0x5fc):C:/Dev-Cpp/main.cpp:149: undefined reference to `glutDisplayFunc'main.o(.text+0x608):C:/Dev-Cpp/main.cpp:150: undefined reference to `glutKeyboardFunc'main.o(.text+0x614):C:/Dev-Cpp/main.cpp:151: undefined reference to `glutIdleFunc'main.o(.text+0x7b4):C:/Dev-Cpp/main.cpp:175: undefined reference to `glutMainLoop'
It is a multimedia project and it has all of the linker parameters. (I think thats what they're called...) If you need them, here they are:
-lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32
BTW, I tried to compile the multimedia project, none of it was modified.
Try starting a regular OpenGL app from the Multimedia tab. Compile, run, if it works, try going through the install directions I gave earlier again. Something might have installed uncorrectly.
EDIT: Just thought of something...
[Edited by - thannett on August 10, 2005 11:39:36 AM]
EDIT: Just thought of something...
[Edited by - thannett on August 10, 2005 11:39:36 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement