Using a specific version of a dynamic library - how?

From: Thomas Aho (my_spam_at_bluewin.ch)
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
    organization
    can run it. A precondition is then of course that they have the
    qt-mt.so.3.1.2
    or qt-mt.so.3.1 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/qt-mt.so will be linked to for example
    qt-mt.so.3.2.2. 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 qt-mt.so.3.1.2 to /usr/lib.

    Is it possible to do what I want?

    /Thomas


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

    Relevant Pages

    • Re: MAXIMA on WINDOWS XP
      ... -> 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, ...
      (sci.math.symbolic)
    • 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. ...
      (Fedora)
    • 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 ...
      (freebsd-questions)
    • RE: Windows Genuine Advantage Notification (KB905474) install fail
      ... Out of the blue I got this need to download again? ... I go through the express and it fails I went throught the Microsoft ... There is no need to install this update." ... shutdown according to the shutdown winwod, but I like to see what I install. ...
      (microsoft.public.windowsupdate)
    • 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. ...
      (microsoft.public.windowsupdate)