From: Andy W. <an...@si...> - 2013-06-02 13:55:17
|
Using multiple versions of a shared library defeats the purpose of a "shared" library. At that point you should just statically link in the needed library version, if statically linking a single library is possible. If it must be shared, you probably can put all the versions of that library in different paths and change the RPATH variable in the executables. Regards, Andy -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. kris duff <t_...@ya...> wrote: Hello, I'm almost done with my software development with my gumstix and there is one thing that I can't understand with the shared library. When I will have 2 or 3 major version of a custom library, how can I say to a program to load the version 1, not the latest ? example I have a shared library named test.so.1.0, it's soname is test.so.1 I create symbolic link to test.so and test.so.1 Now when I compile, in the linker I add -ltest Then, I want to add few new feature in my library, so I create the library test.so.2.1, it's soname is test.so.2 with symbolic link to test.so and test.so.2 When the software will get executed, it will load the latest test shared library. How can I select the version to load ? ( how can I ensure it will always load the version 1 of the library ?) Thank you for your help, I cannot find any information on this on the web. Kris |