On Monday 09 September 2013 13:05:07 Till Oliver Knoll wrote: > Using the rpath linker option with a /relative/ path like "./lib" (relative > to the binary) worked for me. So I don't quite follow the disadvantage
Important note: relative rpathes are not relative to the executable, they are relative to the current working directory! The correct option is: -Wl,-rpath,\$ORIGIN or with a few more quotes for qmake: linux { QMAKE_LFLAGS += -Wl,-rpath,\'\$$ORIGIN\' } rpath $ORIGIN forces the executable to look for any library in the same directory as the executable first. If you want to be a bit nicer to the runtime environment add -Wl,--enable-newdtags - then the $ORIGIN argument will end up in runpath, which is checked later (between $LD_LIBRARY_PATH and system pathes), but which is not-transient (i.e. libraries linked by libraries are not searched in $ORIGIN unless the linking library set the runpath as well). Konrad
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest