undefined reference to openGL functions

Trying to compile a project which works flawlessly on my friend’s xcode setup, I get the following, and more:

undefined reference to ‘glEnableClientState’
undefined reference to ‘glTexCoordPointer’
undefined reference to ‘glEnableClientState’
undefined reference to ‘glVertexPointer’

Any idea why this is?

btw, I’m using code::blocks on ubuntu 11.04 with open frameworks from github. Any thing else I should tell you about my setup?

Thanks very much!


did you run install_dependencies script from scripts/linux/ubuntu?
did it run without errors?
can you compile some other examples from the examples folder without errors?

are you running ubuntu natively in a machine or in a virtual machine? it seems like some older versions of virtual machines 3d emulation are problematic. so if you are running in a vm try updating it, if not which graphics card are using?

You’re missing the GL libraries, so I think there must be some error in install_dependencies like benben mentioned. Either that or there might have been an error in generating all the code::blocks files. I just ran them this morning on my linux machine and it was fine, they should work out of the box. If you’re running from github you can also try the testAllExamples.sh script. If there’s been no problems with either of those scripts, maybe you could post up your project files and specs for your machine and I can sift through them.

oh, yeah, the error with virtual machines is on runtime not when compiling. you should be missing some library

Reviving this thread, because I had the same issue with Ubuntu 18.04 and my NVIDIA Driver (440+).

It seems like the NVIDIA driver installed the GL library where OF didn’t expect. I solved it by creating a symbolic link to the proper directory following these instructions: http://techtidings.blogspot.com/2012/01/problem-with-libglso-on-64-bit-ubuntu.html