If I want to run on a PC a program that uses the qt, I have to install all the qt package, or i can simply import the used library?
For example
If I have an executable for linux it will start on all machines linux?
If I want to run on a PC a program that uses the qt, I have to install all the qt package, or i can simply import the used library?
For example
If I have an executable for linux it will start on all machines linux?
If Qt was linked statically to your application -> no problem on other machines.
If Qt was linked dynamically then you need the same Qt version on both machines (e.g. 4.x).
You should have a look at http://doc.trolltech.com/4.4/deployment.html, it describes pretty well what you have to do to deploy a Qt application under different operating systems.
As a rule of thumb: no, you don't have to install the whole Qt package, as this includes far more than what you need, like examples, documentation etc., things a mere user would certainly not be interested in. All you need are the libraries your application is linked against. How to determine these libraries depends on the platform you target. Again, the docs mentioned above should tell you what you need.
A simple, single executable meant for all Linux's surely wouldn't work on all Linux machines, unless it was linked statically. There are just too many possible setups (all hail LSB!), but deploying an application for Linux should be quite easy, as nearly all of them support Qt in one way or another, so supporting a platform should take little more than a recompile for that platform. I've experienced far more problems when deploying to Windows, for example.
I have created an application(On Ubuntu) that allows you to select an image, so the displays.
On the machine where I installed the whole package works QT.
If I try to bring the application on another computer with ubuntu then the system says that :
libQtGui.so
libQtCore.so
Not Found
I created a folder to which I added the libraries and I added the path of this folder in LD_LIBRARY_PATH.
Now if i try to run application it doesn't work correctly. In fact, when i select an image and clic open it shows a windows (that i have done in my program) to tell me that the image can not be loaded.
How I can solved my problem?
You probably are missing the right plugin to display the image. Have a look at the /usr/lib/qt4/plugins/imageformats/ directory on your Ubuntu box. You have to deploy these libraries too for your application to support these types.
Please see the page in Assistant on "Deploying an Application on X11 Platforms". It discusses everything you need to do, including plugins.
Bookmarks