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

Thiago Macieira thiago.macieira at trolltech.com
Thu Mar 5 02:36:06 CET 2009


Marcelo Estanislau Geyer wrote:
>Hi friends,
>
>With the release of QT 4.5 came a doubt.
> How can I do with my application use the libraries of QT 4.5 and
>OS / KDE 4.2 use the native version (4.4 in this case as an example). I
>have a directory called "lib" where are some libraries and add this path
> in ld.so.conf. If I put the QT 4.5 libraries in this directory (lib),
> KDE and other applications use these libraries, how can I separate
> this?

Why do you want to separate? KDE 4.2 can use Qt 4.5 without a problem. In 
fact, I talked this morning to two Linux distributors and they're 
upgrading Qt in their systems to 4.5 already.

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.

Another alternative is to use a shell script that sets LD_LIBRARY_PATH to 
the correct value prior to launching the actual binary.

-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Product Manager - Nokia, Qt Software
      Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090304/6a671c39/attachment.bin 


More information about the Qt-interest-old mailing list