On Tue, 26 Feb 2002, DaZZa wrote: > fred:/lib # ls -l libncur* > lrwxrwxrwx 1 root root 17 Feb 27 2002 libncurses.so.5 -> > libncurses.so.5.2 > -rwxr-xr-x 1 root root 319472 May 12 2001 libncurses.so.5.2 > > fred:/usr/lib # ls -l libncur* > lrwxrwxrwx 1 root root 22 Feb 26 16:38 libncurses.so -> > /lib/libncurses.so.5.2 > > As you can see, I've got version 4.2 & 5.2 in /lib, and version 1.9.7a in > /usr/lib. > > Now the ncurses source archive attempts, by default, to install in > /usr/lib - my question to you learned gentlemen and ladies - could the > current version of the kernel source tree be looking here first, and hence > causing my problems?
By my understanding, using -l<libname> (as the kernel tree uses, IIRC) looks in your entire library path looking for a file named lib<libname>.so. If it finds one, it uses that to supply the library linkage. If it doesn't, it looks for lib<libname>.a in your library path. Since you seem to have both those, in well-known locations, and containing the right stuff, I don't think this is your problem. > Or am I barking up the wrong tree, and having two different versions of > libncurses is perfectly acceptable? Perfectly. The situation, typically, is thus: Actual shared libraries are named lib<libname>.so.<maj>.<min>.<patch>. If programs want to use those names, that's perfectly fine. Typically, however, major versions of a library are all ABI compatible (or that's the theory) so you only have to link against lib<libname>.so.<maj> - which is a symlink to the actual specific version of the library on your system. When you want to link against a library, you look for a file lib<libname>.so and use that - it should, typically, point to a version of the library which implements the functions and whatnot described in the header files installed on the system. This should, in general, be lib<libname>.so.<maj>, to allow the linker to put the right info in the binary so it can find the library later on. If you post the exact error messages, it might shed a bit more light on the exact problem. Certainly your shared library situation seems pretty reasonable. -- ----------------------------------------------------------------------- #include <disclaimer.h> Matthew Palmer [EMAIL PROTECTED] -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
