Find the answer to your Linux question:
Results 1 to 4 of 4
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    23

    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

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134

  3. #3
    Just Joined!
    Join Date
    Jul 2009
    Posts
    23
    What about it?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    It explains about the use of symlinks to libraries so that
    you only specify the library name to the linker, instead
    of the specific file and version number. This way your software
    is portable to someone else's computer, even if they have
    a different version of the library.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •