dannis dannis - 1 month ago 14
C++ Question

Failed to compile wxWidgets-2.9.2 on Kubuntu11.10(64bit) with '--with-opengl' flag

I tried to compile wxWidgets-2.9.2 with opengl support by calling

configure --with-opengl


But it failed when the configure script tried to locate the lib files of opengl

checking for GL/gl.h... yes
checking for GL/glu.h... yes
checking for -lGL... no
checking for -lMesaGL... no
configure: error: OpenGL libraries not available


However, I checked /usr/lib and found that there is libGL.so in that directory. Actually, before trying to compile wxWidgets-2.9.2, I had written several opengl programs and all were successfully compiled and run. Could someone help me to fix this?




This is actually a bug in the configure script, please see

http://trac.wxwidgets.org/ticket/13375.


The solution is to download the latest codes from

http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk/


Or you can select to overwrite only the configure,acinclude.m4 files.

Answer

Have you tried installing the free implementation?

sudo apt-get install libglw1-mesa libglw1-mesa-dev

Are you running proprietary drivers from Nvidia or something? I think it messes around with the OpenGL environment while installing. Perhaps, it is worth trying to go back the the opensource ones if this is the case.

Comments