A Dimecres 28 Febrer 2007 20:28, Lennart Sorensen va escriure: > On Wed, Feb 28, 2007 at 08:18:59PM +0100, Leopold Palomo Avellaneda wrote: > > I begin to understand. But, if I link a program with -lGL, which one use: > > libGL.so.1 or libGL.so ? > > libGL.so since you are compiling. Since libGL.so is a symlink to > libGL.so.1 in this case, it will end up having a runtime requirement of > libGL.so.1, the libGL.so is simply there so that the linker can find it > based on -lGL and of course the opengl.h header matters too, since it > should match the library. ummm, for example, without the nvidia-glx, I have: leo@indiana:~$ ls -la /usr/lib64/libGL* lrwxrwxrwx 1 root root 10 2007-02-28 12:42 /usr/lib64/libGL.so -> libGL.so.1 lrwxrwxrwx 1 root root 12 2007-02-28 12:42 /usr/lib64/libGL.so.1 -> libGL.so.1.2 -rw-r--r-- 1 root root 584296 2007-02-23 03:21 /usr/lib64/libGL.so.1.2 ok, is what you are saying. Any program that use the libGL is redirected to the libGL.so.1, etc. The glxinfo | grep OpenGL && glxinfo | grep direct command: OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce FX 5600/AGP/SSE2 OpenGL version string: 1.4 (2.0.2 NVIDIA 87.76) OpenGL extensions: direct rendering: No ok. if I install the nvidia-glx package I obtain: rwxrwxrwx 1 root root 37 2007-02-28 21:34 /usr/lib64/libGL.so -> /usr/lib/nvidia/libGL.so.1.2.xlibmesa lrwxrwxrwx 1 root root 17 2007-02-28 21:34 /usr/lib64/libGL.so.1 -> libGL.so.1.0.8776 -rw-r--r-- 1 root root 735592 2007-01-05 05:37 /usr/lib64/libGL.so.1.0.8776 and the libGL.so is pointng to /usr/lib/nvidia/libGL.so.1.2.xlibmesa. and this file is the same as the mesa provides. So, in this case the link is not to libGL.so.1 . libGL.so.1 is pointing correctly to the nvidia lib. But I have: leo@indiana:~$ glxinfo | grep OpenGL && glxinfo | grep direct OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce FX 5600/AGP/SSE2 OpenGL version string: 2.0.2 NVIDIA 87.76 OpenGL extensions: direct rendering: Yes > That is why the nvidia-glx init.d script > checks if mesa-dev is installed, in which case it makes libGL.so a link > to the xlibmesa version of libGL.so.1 and otherwise if nvidia-glx-dev is > installed instead then it makes libGL.so a link to the nvidia version of > libGL.so.1, and if neither is installed, you get no libGL.so at all, > since without headers you are in no state to compile stuff anyhow. so, if I understand you, if I want to make a program that use libGL accelerated I have to compile it normally, with the libgl1-mesa-dev - then deinstall the libgl1-mesa-dev library - restart the nvidia-glx and run the program, that will use the libgl of nvidia instead of the libgl.xmesa, no? Regards, Leo -- -- Linux User 152692 PGP: 0xF944807E Catalonia
Attachment:
pgpVq1k0lcVup.pgp
Description: PGP signature