PDA

View Full Version : Make Qt application portable



Cerberus
23rd October 2015, 20:19
I have developed a Qt application on Ubuntu. I'd like to test the application on different systems (Linux VMs). Do I have to install Qt on every VM or can I just statically link the qt libraries in Qt creator somehow and create a single package that I can execute on the VM?

ChrisW67
23rd October 2015, 21:31
Do I have to install Qt on every VM
No.

can I just statically link the qt libraries in Qt creator
Yes you can but it requires that you build and uncommon libraries you use, and Qt itself, for static linking and use that to build your application.

It is much easier to produce a dynamically linked executable and bundle its required Qt/uncommon libs together with a wrapper script into a tar file. That file just needs to be untarred to "install". See http://doc.qt.io/qt-5/linux-deployment.html#creating-the-application-package