Using a specific version of a dynamic library - how?

From: Thomas Aho (
Date: 05/08/04

  • Next message: Paul Pluzhnikov: "Re: Using a specific version of a dynamic library - how?"
    Date: 8 May 2004 08:03:47 -0700

    Hi all,
    Is there a way to link my application in a way, which makes it select
    a certain version of a dynamic library at run-time?

    Say for example that I write an application and use qt 3.1.2. I want
    to be
    able to install the binary on a server from where everyone in my
    can run it. A precondition is then of course that they have the
    or somewhere in their LD_LIBRARY_PATH.
    The problem is that if there is also a newer version of qt installed
    on their
    system, /usr/lib/ will be linked to for example When
    starting my application, it will load the 3.2.2 version of qt-mt,
    which fails.
    What I simply would like to do is to link my application in a way
    which makes
    it "look for 3.1.2; if there is no 3.1.2, look for 3.1; if there is no
    3.1, look for 3, ...".
    The only possiblity I currently have is to give a directory to the
    linker, and it will look in that directory first for libs (e.g.
    /usr/lib/qt-3.1.2/lib). That however requires that all users have qt
    3.1.2 installed in that directory, which is a bit lot to require from
    someone who is not developing qt applications. I would rather just
    like to copy to /usr/lib.

    Is it possible to do what I want?


  • Next message: Paul Pluzhnikov: "Re: Using a specific version of a dynamic library - how?"

    Relevant Pages

      ... -> fails ... >>> and did you install from precompiled rpms or did you compile it? ... >>> If you can't find the control panel you might try ... > I'm guessing the Windows XP Firewall, introduced with SP2, ...
    • RE: ISO Image Problem
      ... If that fails, then I'll try using a different CDROM drive in my target ... Subject: ISO Image Problem ... Try skipping mediacheck, ... possibility it will successfully complete the install anyway. ...
    • Re: Trouble with installing FreeBSD to a laptop
      ... now it fails with the exact same panic during the ... >> I'm having some troubles with installing FreeBSD on my laptop. ... >> but i can't seem to figure out the why the kernel panics (I'm just ... >> computer before, but a job required me to install ...
    • Re: Win 98SE Update Fails To Start
      ... Did you also disable the script blocking component of your AV? ... Windows folder with Notepad, scroll down towards the bottom for the most ... > process just fails to start. ... I was prompted to install it again. ...
    • Re: installing tomcat4
      ... Adam Hardy wrote: ... > Does the apt-get remove work OK or does it fail? ... > If the remove fails, when you see the error message, check out the ... original install occurred prior to the sarge upgrade. ...