[Qt-interest] How to port a application to another system
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Mon May 11 09:55:31 CEST 2009
Raja Sekharan wrote on Sunday, May 10, 2009 10:36 AM:
> ...
> You just have to put these files in the same directory as the
> executable's directory and run the executable in the other computer.
This "put it in the same directory as the executable"-concept is a "Windows thing", it does not /necessarily/ work on all (or even most?) Linux distributions! Specifically if you don't have '.' in your PATH then it won't. Given the linker -rpath option you can "hardcode" this path into the executable though (with all the elsewhere discussed caveats and "don't"-s about this approach).
The preferred way of distributing your app seems to be to put your shared libraries into "well-known" directorys, such as /usr/lib (and /usr/bin for the executable etc.). Another approach would be to provide shell scripts which set the LD_LIBRARY_PATH and 'cd' into the proper directory etc. before they start your actual executable.
All these approaches have been discussed up and down for the last century and are actually off-topic on this list. But you'll find some good starting points here: http://doc.qtsoftware.com/4.5/deployment.html
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list