Hi,
I'm developing a 3rd party library that can be installed as a part of Qt SDK.
I have the Qt SDK installed to the default dir - in my home dir, /home/username/QtSDK.
The problem is that when I compile the library, linker links absolute paths of my home dir to the binary.
When I check the lib dependencies of my library with ldd ./libmylib.so, there are:
libQtMobilitySimulator.so.1 => /home/username/QtSDK/Simulator/QtMobility/gcc/lib/libQtMobilitySimulator.so.1 (0x008a1000)
libQtServiceFramework.so.1 => /home/username/QtSDK/Simulator/QtMobility/gcc/lib/libQtServiceFramework.so.1 (0x009fc000)
libQtCore.so.4 => /home/username/QtSDK/Simulator/Qt/gcc/lib/libQtCore.so.4 (0x00254000)
Now, when I copy the lib to another computer with other user name, ldd cannot find the dependecies.
What is the preferred way on Linux platform to change those library paths in the binary to correspond the destination computer Qt paths?
On Mac OS X there's a tool called install_name_tool, which does the trick. Qt SDK installer seems changing RPATHs on the fly when it installs the libraries to desired location. For convenience, I'd like to have the library installed under the default path /home/username/QtSDK, not in the /usr/lib.
Many thanks in advance!
Bookmarks