I built my qt app so that all the Qt modules it uses are contained in the same directory as the executable. It works on the machine I used to build the app and I made sure to test this by removing those shared libraries everywhere except in the current directory of the app. Doing a ldd shows that its looking for those libraries in the current directory and putting the executable by itself fails to open the exectuable. So this is all good but when I transfer this directory to a host machine it still cant find those libraries. what could be the problem?
+2
A:
Is "." in the LD_LIBRARY_PATH on the 2nd machine?
Do you have the correct permissions on the library files?
Martin Beckett
2010-03-23 18:41:40
that did the trick thanks :D
yan bellavance
2010-03-23 18:44:10
Is there a way for me to set this path automatically without user intervention ie whenever the user starts the program from the desktop or a command lined, the LD_LIBRARY_PATH is modified. I want the user to be able to install the program by simply copying the directory wherever he wants and without modifyin his login script and whatnot.
yan bellavance
2010-03-23 18:47:31
Not done much app deployment on Unix, you need to make sure that "." is at least on the exec path. Might be worth looking at making a proper RPM/DEB to put the .so in the system rather than messing about with the user editing paths
Martin Beckett
2010-03-23 19:06:39
@yan bellavance: You could make a script with your app name, which adds the local path to the LD_LIBRARY_PATH, then calls your real application. Not the best way of doing things, but a fairly simple workaround.
Caleb Huitt - cjhuitt
2010-03-26 16:49:10