Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved Required minimum Qt 5.7 shared libraries (.so) for Linux deployment

    Installation and Deployment
    qt 5.7 linux deploy shared library
    2
    7
    2755
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • lindevs
      lindevs last edited by lindevs

      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.

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by mrjj

        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

        1 Reply Last reply Reply Quote 2
        • lindevs
          lindevs last edited by

          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
          
          mrjj 1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion @lindevs last edited by

            @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

            http://stackoverflow.com/questions/17106315/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without

            1 Reply Last reply Reply Quote 2
            • lindevs
              lindevs last edited by lindevs

              I think that I found missing .so files. Thanks.

              mrjj 1 Reply Last reply Reply Quote 1
              • mrjj
                mrjj Lifetime Qt Champion @lindevs last edited by

                @lindevs
                which was it ?

                1 Reply Last reply Reply Quote 1
                • lindevs
                  lindevs last edited by lindevs

                  @lindevs said:

                  libqxcb.so

                  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
                  
                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post