[Qt-interest] [OT] Specify location of DLL dependencies on Windows
Arve Knudsen
arve.knudsen at gmail.com
Tue Jan 20 19:26:39 CET 2009
I take it noone has a solution for my original problem?
Arve
On Tue, Jan 20, 2009 at 5:52 PM, Thiago Macieira <
thiago.macieira at trolltech.com> wrote:
> Em Terça-feira 20 Janeiro 2009, às 17:12:58, Paul Floyd escreveu:
> > Quoting Thiago Macieira <thiago.macieira at trolltech.com>:
> > > Em Terça-feira 20 Janeiro 2009, às 12:23:06, Paul Floyd escreveu:
> > > > IMO LD_LIBRARY_PATH is a bad idea, and should only be used as a last
> > > > resort. The best way is to use the RPATH.
> > >
> > > Distributions recommend against both solutions. They prefer that all
> > > libraries
> > > get installed to locations defined in /etc/ld.so.conf. That way,
> ldconfig
> > > can cache the locations and be faster. Also, prelinking will work.
> >
> > Are you saying that linux distributions suggest installing user shared
> libs
> > in system directories? Or using ldconfig to include user paths?
>
> Well, that's what they suggest for themselves... :-)
> See http://wiki.debian.org/RpathIssue [*]
>
> They only put libraries in /usr/lib and very few other places. When they do
> put in other places, they add it to ld.so.conf (which has even a subdir
> now:
> /etc/ld.so.conf.d/, yay for having three dots in the same name!).
>
> If the application gets installed to /usr/local, there's no need for RPATH,
> since /usr/local/lib is usually already searched by the dynamic linker.
>
> However, if you're installing to a non-standard location, then yes, you
> need
> RPATH or LD_LIBRARY_PATH trickery (commercial apps like Google Earth do
> that).
>
> BTW, one detail: I do not advocate using RPATH. It should be RUNPATH. It's
> set
> with the same linker option (-Wl,-rpath,....), but it's not enabled by
> default
> in a source build of GNU binutils.
>
> [*] the wiki is wrong: RPATH is searched before LD_LIBRARY_PATH. RUNPATH is
> searched after LD_LIBRARY_PATH, which is why it's recommended.
>
> > What would you suggest for a binary package that includes "myapp",
> > "libfoo.so" using Qt 4.3, targeting RHEL 4.0 and later?
>
> In order of preference:
>
> Option 1: make it open source and let the distribution package it
>
> Option 2: install it to /usr/local/{bin,lib}
>
> Option 3: install it to /opt/uniquename/ and use RUNPATH/LD_LIBRARY_PATH.
>
> Note that, even with option 3, if you want to add entries to the XDG menu
> structure or MIME-type system, the .desktop files have to be installed to
> /usr/local/share or they won't be picked up.
>
> --
> Thiago Macieira - thiago.macieira (AT) nokia.com
> Senior Software Engineer - Nokia, Qt Software
> Qt Software is hiring - ask me
> Sandakerveien 116, NO-0402 Oslo, Norway
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090120/81cfd519/attachment.html
More information about the Qt-interest-old
mailing list