Hi Andy,

Thank you for your reply.

I do not agree with you for the different version of a shared library. If I write 2 software that need few same functions I will create a library with major version 1.

Then I write another software that pushes me to change the api of the first library, I will change the major version of the library to 2. So my first 2 software will load major version 1, and my last software would load the version 2.

I guess this is ok, and tell me if I am wrong, but I've seen this kind of behavior for software that need libc with minimum library requirement.

Is there something missing in my understanding of the library management in linux software ?

Thank you !

I appreciate your help


From: Andy Walls <andy@silverblocksystems.net>
To: kris duff <t_dufff@yahoo.ca>; General mailing list for gumstix users. <gumstix-users@lists.sourceforge.net>
Sent: Sunday, June 2, 2013 9:55:11 AM
Subject: Re: [Gumstix-users] how to load specific version of shared library ?

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.


Sent from my Android phone with K-9 Mail. Please excuse my brevity.

kris duff <t_dufff@yahoo.ca> wrote:

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 ?

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.