Thursday 15 December 2011

How to link with libxxx.so and NOT libxxx.so.nn?

How to link with libxxx.so and NOT libxxx.so.nn?

Folks,

This is a beginner question. I have built an executable that depends on many system libraries. When I run "ldd" on the file, I can see the dependencies such as "libxxx.so.23." If I have to redistribute this executable to be run on a different machine, the machine may have "libxxx.so.22" and not "libxxx.so.23." I am thinking if my executable was looking for "libxxx.so" instead of a specific version, I won't run into such problems.

I would appreciate your help in understanding how to make an executable work with whatever version of the library that may be present on the machine. Or, am I missing something more fundamental?

Thank you in advance for your help.

Regards,
Peter

No comments:

Post a Comment