Sign in to follow this  
Cruentus

Linker Error in the begginers Lessons...

Recommended Posts

Cruentus    122
Hello everyone here! I was following the lesson to create a window with openGL (so newbie ^^) but when I tried to compile it with Dev-C++, I've got these errors: [Linker error] undefined reference to `glViewport@16' [Linker error] undefined reference to `glMatrixMode@4' [Linker error] undefined reference to `glLoadIdentity@0' [Linker error] undefined reference to `gluPerspective@32' [Linker error] undefined reference to `glMatrixMode@4' [Linker error] undefined reference to `glLoadIdentity@0' [Linker error] undefined reference to `glShadeModel@4' [Linker error] undefined reference to `glClearColor@16' [Linker error] undefined reference to `glClearDepth@8' [Linker error] undefined reference to `glEnable@4' [Linker error] undefined reference to `glDepthFunc@4' [Linker error] undefined reference to `glHint@8' [Linker error] undefined reference to `glClear@4' [Linker error] undefined reference to `glLoadIdentity@0' [Linker error] undefined reference to `wglMakeCurrent@8' [Linker error] undefined reference to `wglDeleteContext@4' [Linker error] undefined reference to `ChoosePixelFormat@8' [Linker error] undefined reference to `SetPixelFormat@12' [Linker error] undefined reference to `wglCreateContext@4' [Linker error] undefined reference to `wglMakeCurrent@8' [Linker error] undefined reference to `SwapBuffers@4' Since I'm newbie both in C++ and OpenGL I can't realize what these errors should be and how to solve then. It's something realted to the glaux header file? It's missing on my computer, so I commented the line with the include... And I don't how to use the Glaux replacement file, I've tried an include, but I got too many errors within it. Can anyone help me?? Thanks.

Share this post


Link to post
Share on other sites
eSCHEn    394
In Dev-C++ go to Project Options -> Parameters Tab -> Linker Box and add these two lines:
-lopengl32
-lglu32

That should fix it.

Share this post


Link to post
Share on other sites
Cruentus    122
Ok, it worked after I used this... ^^

thx so much

But...

I've tried the texture tutorial and I've got some parse errors (the code is correct, I've dowloaded the tuto to certify).

Then I've searched the web for glaux.h found it and copied to the include dir, ok the parse and undeclared function errors ended. but the #@$@#$ linker error came back to me ¬¬

I've tryied the same tip: in the project option, parameter, linker, I added -lglaux. The linker error disappeared, but I got a "missing DLL" error... the dll? GLAUX.DLL...

Please can someone help me???

thx again

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this