Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Required minimum Qt 5.7 shared libraries (.so) for Linux deployment
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Solved Installation and Deployment
qt 5.7linuxdeployshared library
7 Posts 2 Posters 3.4k Views
  • 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.
  • L Offline
    L Offline
    lindevs
    wrote on 15 Aug 2016, 09:00 last edited by lindevs
    #1

    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
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 15 Aug 2016, 11:02 last edited by mrjj
      #2

      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
      2
      • L Offline
        L Offline
        lindevs
        wrote on 16 Aug 2016, 10:56 last edited by
        #3

        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
        
        M 1 Reply Last reply 16 Aug 2016, 11:00
        0
        • L lindevs
          16 Aug 2016, 10:56

          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
          
          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 16 Aug 2016, 11:00 last edited by
          #4

          @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
          2
          • L Offline
            L Offline
            lindevs
            wrote on 24 Aug 2016, 10:42 last edited by lindevs
            #5

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

            M 1 Reply Last reply 24 Aug 2016, 10:45
            1
            • L lindevs
              24 Aug 2016, 10:42

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

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 24 Aug 2016, 10:45 last edited by
              #6

              @lindevs
              which was it ?

              1 Reply Last reply
              1
              • L Offline
                L Offline
                lindevs
                wrote on 24 Aug 2016, 11:03 last edited by lindevs
                #7

                @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
                1

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved