[quake2] Quake 0.16 rc2...

Ludwig Nussel ludwig.nussel at gmx.de
Sat Sep 25 12:01:46 EDT 2004

Brendan Burns wrote:
> Hmm is that true?
> I have to admit to a certain amount of ignorance when it comes to this 
> stuff, but my understanding was:
> 	libFoo.so = most generic shared (eg dynamically linked) library
> 	libFoo.so.1 = version 1 of said library
> 	libFoo.a = the version of the library for static linking.
> In fact on most systems libGL.so is a symbolic pointer to a specific 
> libGL.so.x.y.

In theory it should only be there if OpenGL development stuff is
installed. In practice it's probably there because everyone gets it

Example of correct library usage:

$ ls -l /usr/lib/libhd.so*
lrwxrwxrwx  1 root root      10 2004-09-25 17:43 /usr/lib/libhd.so -> libhd.so.8
lrwxrwxrwx  1 root root      13 2004-08-28 14:13 /usr/lib/libhd.so.8 -> libhd.so.8.62
-rwxr-xr-x  1 root root 1104680 2004-08-25 22:04 /usr/lib/libhd.so.8.62
$ rpm -qf /usr/lib/libhd.so
$ rpm -qf /usr/lib/libhd.so.*

If you compile something and link against -lhd the linker searches
for libhd.so, looks at the SONAME and puts that into the
requirements of the program:

$ objdump -p /usr/lib/libhd.so|grep SONAME
  SONAME      libhd.so.8
$ objdump -p /usr/sbin/hwinfo|grep libhd
  NEEDED      libhd.so.8

If some binary incompatible changes are made to libhd, the version
changes from 8 to 9. Since you probably want to always link newly
compiled programs against the most recent version, libhd.so would
point to libhd.so.9. If you still have programs around that need the
old interface you can have libhd.so.8 and libhd.so.9 installed in
parallel and it will just work because the SONAME is used. Old
programs would would segfault if they had libhd.so in NEEDED.

Since the SONAME of the library you want to use is libGL.so.1 you
also have to dlopen libGL.so.1. Another possibility would be to get
rid of dlopen and directly link against -lGL.


(o_  Ludwig.Nussel at gmx.de
//\  PGP Key ID: FF8135CE
V_/_ ICQ:        52166811

More information about the quake2 mailing list