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.
  • lindevsL Offline
    lindevsL Offline
    lindevs
    wrote on 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
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on 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
      • lindevsL Offline
        lindevsL Offline
        lindevs
        wrote on 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
        
        mrjjM 1 Reply Last reply
        0
        • lindevsL lindevs

          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
          
          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on 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
          • lindevsL Offline
            lindevsL Offline
            lindevs
            wrote on last edited by lindevs
            #5

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

            mrjjM 1 Reply Last reply
            1
            • lindevsL lindevs

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

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @lindevs
              which was it ?

              1 Reply Last reply
              1
              • lindevsL Offline
                lindevsL Offline
                lindevs
                wrote on 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