hi!
I can't get work openGL under linux - not work compiled programs with openGL driver.
I have Debian Sarge, and I did apt-get to all gl packages that was mentioned the faqs. Additionally I have Geforce2, and have installed the newest driver.
In /usr/X11R6/lib there is
lrwxr-xr-x 1 root root 12 Jun 10 18:51 libGL.so -> libGL.so.1.2
-rw-r--r-- 1 root root 437376 Jun 1 06:03 libGL.so.1.2
files I think this good. I also have GLU packages.
So when I type make command to compile an example it compiling without errors, but when I trying to run the compiled binary, I got the next error:
./example: relocation error: ./example: undefined symbol: glXGetProcAddress
Thanks,
kib.
openGL under linux - configuration trouble
There might be still some problems with OpenGL linking. Try the patches from parsys.informatik.uni-oldenburg.de/~hybrid/irrlicht
It might be a problem with header files, though. If the irrlicht glext.h does not match your version of libGL it might be a problem. Try to use glext.h from system include path then.
It might be a problem with header files, though. If the irrlicht glext.h does not match your version of libGL it might be a problem. Try to use glext.h from system include path then.
I apply the "# OpenGLExtension.patch but same problem again as above. After all as you said I tried to apply glext.h from my system. So there is a new problem. When I try to compile Irrlicht engine got this error: (with the original glext.h its compiled with no errors)
++ -c CTRTextureGouraud.cpp -o CTRTextureGouraud.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CTRTextureGouraudAdd.cpp -o CTRTextureGouraudAdd.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CTRTextureGouraudNoZ.cpp -o CTRTextureGouraudNoZ.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CTRTextureGouraudWire.cpp -o CTRTextureGouraudWire.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CZBuffer.cpp -o CZBuffer.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c COpenGLDriver.cpp -o COpenGLDriver.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
COpenGLDriver.cpp: In member function `virtual void
irr::video::COpenGLDriver::setPixelShaderConstant(f32*, int, int)':
COpenGLDriver.cpp error: `GL_FRAGMENT_PROGRAM_ARB' undeclared (first use
this function)
COpenGLDriver.cpp error: (Each undeclared identifier is reported only
once for each function it appears in.)
make: *** [COpenGLDriver.o] Error 1
++ -c CTRTextureGouraud.cpp -o CTRTextureGouraud.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CTRTextureGouraudAdd.cpp -o CTRTextureGouraudAdd.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CTRTextureGouraudNoZ.cpp -o CTRTextureGouraudNoZ.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CTRTextureGouraudWire.cpp -o CTRTextureGouraudWire.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CZBuffer.cpp -o CZBuffer.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c COpenGLDriver.cpp -o COpenGLDriver.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
COpenGLDriver.cpp: In member function `virtual void
irr::video::COpenGLDriver::setPixelShaderConstant(f32*, int, int)':
COpenGLDriver.cpp error: `GL_FRAGMENT_PROGRAM_ARB' undeclared (first use
this function)
COpenGLDriver.cpp error: (Each undeclared identifier is reported only
once for each function it appears in.)
make: *** [COpenGLDriver.o] Error 1
compiling on FC4
For me the editing of Makefile worked, I changed the line 7 to look like this:
I have nvidia-glx-devel (and other NVidia drivers) installed from rpm.livna.org.
But if that doesn't work, here's how I did it before I tried editing the Makefile:
First, in COpenGLDriver.cpp define this before #include's:
then, near line 360, change the following:
to something like:
or instead of removing lines, #undef GLX_VERSION_1_4 after #include's
I'm also on FC4 with NVidia (or how is it spelled correctly), the problem with the standard includes in /usr/include/GL/ is that they are for GLX version 1.4 but the NVidia's GLX library is 1.3.
Regards,
Steve[/code]
Code: Select all
CXXINCS = -I"/usr/include/nvidia/" -I"include/" -I"zlib/"
But if that doesn't work, here's how I did it before I tried editing the Makefile:
First, in COpenGLDriver.cpp define this before #include's:
Code: Select all
#define GLX_GLXEXT_LEGACY
Code: Select all
#ifdef GLX_VERSION_1_4
glXGetProcAddress(reinterpret_cast<const GLubyte*>("glActiveTextureARB"));
#else
glXGetProcAddressARB(reinterpret_cast<const GLubyte*>("glActiveTextureARB"));
#endif
Code: Select all
glXGetProcAddressARB(reinterpret_cast<const GLubyte*>("glActiveTextureARB"));
Code: Select all
#undef GLX_VERSION_1_4
I'm also on FC4 with NVidia (or how is it spelled correctly), the problem with the standard includes in /usr/include/GL/ is that they are for GLX version 1.4 but the NVidia's GLX library is 1.3.
Regards,
Steve[/code]
I also encountered similar problems with nvidia drivers using Suse 9.x and proprietary nvidia drivers. But even if these drivers provide GLX 1.3, why does the ifdef refuse to work? It seems as if nvidia is providing some mix between 1.3 and 1.4 and this might be the problem. I did not check it yet, though, as most machines I'm working on are using ATI cards.
Seems like I didn't express myself clear enough, so here's another try:
Nvidia provides the correct set of files. The problem is that /usr/include/GL/* files are provided by your linux distributor and they contain header files for GLX 1.4, those files define the GLX_VERSION_1_4 macro (see glxtokens.h).
If you include the correct headers that you get from Nvidia the problem goes away, on Fedora with the livna rpms they get installed to /usr/include/nvidia/.
So you are using include files from your distributor of version 1.4 and library of version 1.3 (shared object .so) from Nvidia.
Regards,
Steve
Nvidia provides the correct set of files. The problem is that /usr/include/GL/* files are provided by your linux distributor and they contain header files for GLX 1.4, those files define the GLX_VERSION_1_4 macro (see glxtokens.h).
If you include the correct headers that you get from Nvidia the problem goes away, on Fedora with the livna rpms they get installed to /usr/include/nvidia/.
So you are using include files from your distributor of version 1.4 and library of version 1.3 (shared object .so) from Nvidia.
Regards,
Steve