[Qt-interest] App with QT4.5 and OS/KDE with QT 4.4

Paul Floyd paulf at free.fr
Thu Mar 5 18:25:06 CET 2009


Quoting Thiago Macieira <thiago.macieira at trolltech.com>:

> But, if you really want to separate, you can use the rpath feature. By
> passing the -Wl,-rpath,$QTDIR/lib option to the linker (add it to your
> QMAKE_LFLAGS), you're telling the dynamic linker to override the system
> default search paths and use that configuration instead.

Where, of course, $QTDIR is really the directory where the Qt 4.5.0 libs are.
Alternatively, if you have /installdir/bin and /installdir/lib, then apps in
/installdir/bin could be linked with -R $ORIGIN/../lib. This time, $ORIGIN is a
literal string, not an environment variable. Then copy your Qt libs to
/installdir/lib, and no more conflicts or need for LD_LIBRARY_PATH.

A+
Paul



More information about the Qt-interest-old mailing list