Skip to main content
gamedev.net
🔒 Locked

Dev Cpp Error Help

Started by Mad_Koder Dec 10, 2005 at 11:58 AM 3 replies 850+ views
Original Post
Mad_Koder
Mad_Koder
-Since their is OpenGL code in the sample that has an error, I was going to put in in the OpenGl forums, but I dont think the main problem is OpenGL thus, is a "General Programming" question I am using glut.h, glu.h, gl.h, and,windows.h; and the code isnt reconizing I have the glut.h file so it can't use the OpenGl functions.Here is the errors: [Linker error] undefined reference to __glutInitWithExit@12' [Linker error] undefined reference to __glutCreateWindowWithExit@8' [Linker error] undefined reference to `__glutCreateMenuWithExit@8' Here is the one I am wondering about mostly: C:\Program Files\Dev-Cpp\Makefile.win [Build Error] [Quaritine.exe] Error 1 Code: #include <windows.h> #include <gl/glut.h> #include <gl/glu.h> #include <gl/gl.h> void RenderScene(void) { glClear(GL_COLOR_BUFFER_BIT); glFlush(); } void SetupRC(void) { glClearColor(0.0f,0.0f, 1.0, 1.0f); } int main(int) { glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutCreateWindow("Quaritine"); glutDisplayFunc(RenderScene); SetupRC(); glutMainLoop(); } Why is thier the build error? Thanks -Mad_Koder
Dont need one.... i'm so cool, dont ask me just do what you do..... meet me in the trap its going down....
rip-off
rip-off
go to project->project options->paramteres->linker options and add -lglu

it might work...

if it doesnt post whats already in the linker options

the compiler is telling you that it cant find the code that the glu functions uses.
Mad_Koder
Mad_Koder
Thanks, but it still is giving me the error, here's what is in the linker option, I am using Dev CPP v 4.9.9.2:

{

windows.h
-lglut32
-lglu32
-lopengl32

}

Thanks
Dont need one.... i'm so cool, dont ask me just do what you do..... meet me in the trap its going down....
Mad_Koder
Mad_Koder
It could also be that that their is a mix of different versions of glut on my computer. Does anyone know what is wrong.
Dont need one.... i'm so cool, dont ask me just do what you do..... meet me in the trap its going down....

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.