View Full Version : How to Runn applications in NON Qt machines

18th November 2006, 09:30
Hello ,
I guess probably many others too have solved this problem that i'm stuck with even now. I have made an application ints running fine in my machine and the machines already having Qt installed but on the other machines it doesn't even start up and when i try and run it using the console it shows libQtGui_Debug.so not found ... Please Help me with this. I have also tried the Release i.e. trying to make theapplication using release version using option make -release but the problem still persists..

18th November 2006, 09:43
Start with reading Deploying Qt applications (http://doc.trolltech.com/4.2/deployment.html). Make sure you follow the platform specific link at the bottom of the page.

18th November 2006, 10:04
I have ! .... but as it says I'd have to make everything statically linked is that the only way... a word would be a gr8 help ! my cause of concern is the size of the application which would be generated after statically linking... as of now I have tried checking the the shared libraries using ldd -v in the destination machine and it shows libQtGui_debug.so.4 not found and that is the only one so which it requires and is not able to find. what should i do !?..help needed here plzz

18th November 2006, 14:50
An application using Qt cannot be run without Qt libraries.

You have two options:

either redistribute appropriate shared libraries along with the application
or link them statically into the application binary.

Only the latter method requires building of a static version of Qt. This is all clearly stated in the documentation.
So, let's say you choose to go with the first approach (shared libs). On *nix there are a few ways to do this. As the docs say:

You can install the Qt libraries in one of the system library paths (e.g. /usr/lib on most systems).
You can pass a predetermined path to the -rpath command-line option when linking the application. This will tell the dynamic linker to look in this directory when starting your application.
You can write a startup script for your application, where you modify the dynamic linker configuration (e.g. adding your application's directory to the LD_LIBRARY_PATH environment variable).

Deploying an application on Qt/X11 - Shared libraries - Creating the application package (http://doc.trolltech.com/4.2/deployment-x11.html#creating-the-application-package).

18th November 2006, 16:08
It'd also compile against a release version of Qt. It is much smaller than debug.