[Solved] Deploy Linux application
-
Hi Folks,
I wrote some posts about the deploying an application on Windows, but at now, I need to deploy my app on linux as well. I use Ubuntu or other Debian base systems. I tried to find any solution without to much resoults... On windows, I put the .dlls next to the .exe and my app is able to start.
On linux, I know only the way that I add the path of librarys to the ld.so. conf file. To do that, the user must have root or sudoers privileges. Can anybody tell me an more flexible way? (the statical linking is not an option to me...)Regards,
Norbert -
Hi, I wrote a "blog post":http://www.tripleboot.org/?p=138 just for you :-) Look for the Linux GCC part!
EDIT: I use the chrpath command, that's the easiest way I think to get your Qt app running in Ubuntu/Debian.
-
Some people say this issue can be solved by adding
@qApp->addLibraryPath("/some/other/path");@
line in code :)
"Linux deployment":http://qt-project.org/doc/qt-5/linux-deployment.html -
Yes, addLibraryPath() can also help, but note this:
when you talk about Qt's libraries and how to find them, it's actually a problem in two parts:
-
getting the OS (in this case Debian/Ubuntu) to load the DLLs needed for your Qt app, for example libQt5Core.so.5, libQt5Gui.so.5 etc.
-
getting Qt itself (once your app is loaded) to find and load the the DLLs needed from the plugins folder, for example platforms\libqxcb.so.
qApp->addLibraryPath() only help you with problem part #2, and the chrpath utility is one way to cope with problem part #1.
-