PDA

View Full Version : how to run it?



nongentesimus
24th April 2006, 17:36
Hello

I have a really simple question. I made a runnable programm file with Qt4.0 under a Linux environment. Now I would like to run this file on an other Linux environment, actually on one, where there is no Qt 4.0 (only Qt 3.2). I cannot do this, I got an error message:
./ulti-gui: error while loading shared libraries:
libQtGui_debug.so.4: cannot open shared object file:
No such file or directory
My programm's project files and makefiles were mainly automatically generated with the commands:
qmake -project
qmake
(I added only one line manually to the project file : QT += network)
and than I just used make to create the runnable.
So what should I do to be able to run it on other Linux systems?

wysota
24th April 2006, 18:06
http://doc.trolltech.com/4.1/deployment.html

nongentesimus
25th April 2006, 06:21
Thanks

I tried the static-linking method. I did everything according to the tutorial, but it still does not seem to work. At least ldd says exactly the same as before. Also, very strangely, the newly created executable is much smaller than the old one. Should'nt it be rather bigger?
There is also a strange passage in the above mentioned tutorial. I think about this:

cd /path/to/Qt
./configure -static -prefix /path/to/Qt <other parameters>
make sub-src

Than it says:
We specify the prefix so that we do not overwrite the existing Qt installation

But if we specify the prefix to be the same don't we just overwrite the existing installation?

Well if I have time I can still try the shared librarys method. However...

Thanks for your answers
Peter

wysota
25th April 2006, 09:50
It means you didn't statically compile Qt or at least didn't statically link your app with it. You should compile static Qt libs and make sure you do link with them and not with the shared version. If you use the same prefix for this installation, you might need to move the shared libs out of the way, so it might prove better to use some other prefix. And remember that you can only make the sub-src target to get the libs compiled. It should finish in much less time then.