[CMake] Dynamic library problem.

Hendrik Sattler post at hendrik-sattler.de
Wed May 27 08:13:27 EDT 2009


Zitat von Andrew Maclean <andrew.amaclean at gmail.com>:

> I am not sure whether this is a CMake setting or not. However we are
> building an application that links against a library in /usr/local/lib
> called e.g libPocoFoundation.so (this is a symbolic link to
> libPocoFoundation.so.6). When we try to run the code on another system
> it fails because in that system, libPocoFoundation.so is a symbolic
> link to libPocoFoundation.so.8 not  libPocoFoundation.so.8. If fact it
> tells us it cannot find libPocoFoundation.so.6.
> I would have thought that if the code is linked against
> libPocoFoundation.so it would not matter about the version number of
> the library (assuming the functions used are unchanged).
>
> Has anyone any advice or comments?

It depends on libPocoFoundation.so: if it has an SONAME, then that is  
used instead of the given filename (in your case  
SONAME=libPocoFoundation.so.6).
The .6 and .8 indicate that the two versions are not binary  
compatible, so that protects you from doing something silly (which may  
only be seen with strange run-time bahaviour).

HS




More information about the CMake mailing list