Required minimum Qt 5.7 shared libraries (.so) for Linux deployment
-
I read this http://doc.qt.io/qt-5/linux-deployment.html article about Qt deployment for Linux. I've seen if I want to deploy my application for Linux I need include the following files:
myapp myapp.sh platforms\libqxcb.so libQt5Core.so.5 libQt5Gui.so.5 libQt5Widgets.so.5
But If I include these Qt .so files my application isn't run. So I need to know what Qt 5.7 shared libraries (.so) I need to include for minimal application, for example:
#include <QtWidgets/QApplication> #include <QtWidgets/QMainWindow> int main(int argc, char *argv[]) { QApplication app(argc, argv); QMainWindow window; window.show(); window.setWindowTitle("Hello world"); return app.exec(); }
I create myapp.sh based on article:
#!/bin/sh appname=`basename $0 | sed s,\.sh$,,` dirname=`dirname $0` tmp="${dirname#?}" if [ "${dirname%$tmp}" != "/" ]; then dirname=$PWD/$dirname fi LD_LIBRARY_PATH=$dirname export LD_LIBRARY_PATH $dirname/$appname "$@"
I need full list Qt 5.7 shared libraries what I need include for this minimal application deployment. My application works well on a development environment.
-
hi and welcome
Cant you use ldd on the .exe to see which "so" it needs?
My fav site for deployment is
http://www.tripleboot.org/?p=536 -
I added missing libraries. I used ldd
libicudata.so.56 libicui18n.so.56 libicuuc.so.56
Now when I run myapp.sh I get error:
This application failed to start because it could not find or load the Qt platform plugin "xcb". Available platform plugins are: xcb.
Why I get this error if I included:
platforms\libqxcb.so
-
@lindevs said:
This application failed to start because it could not find or load the Qt platform plugin "xcb"
hi
do ldd on the libqxcb.so also -
@lindevs said:
libqxcb.so depends on these .so files:
libQt5XcbQpa.so.5 libQt5DBus.so.5
So in my case project structure looks:
myapp myapp.sh platforms\libqxcb.so libQt5Core.so.5 libQt5Gui.so.5 libQt5Widgets.so.5 libicudata.so.56 libicui18n.so.56 libicuuc.so.56 libQt5XcbQpa.so.5 libQt5DBus.so.5