Click here to Skip to main content
15,741,692 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I attend a computergraphic class and have to some programming in OpenGL in c++. I tried to run my programm on my home pc (System: ubuntu) but the compiler gives me two errors:
g++ -Wall myProg.cpp -o runme -lglut -lGLU -lGLEW
(this is the way we compile it in class, and there it works)

/usr/bin/ld: /tmp/ccJmqaFS.o: undefined reference to symbol 'glClear'
//usr/lib/nvidia-331/ error adding symbols: DSO missing from command line

I have searched for the errors in google quiete long, but without sucess, so I hope somebody has a hint for me.
(Glut und Glew is installed, direct rendering is working, glxgears also does what it should, i.e. shows the gears, rotating in different colors)

1 solution

Where have you installed the OpenGL libraries? You may need to use the -L option to tell the linker where they are.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900