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. What is required for link Widgets?
Forum Updated to NodeBB v4.3 + New Features

What is required for link Widgets?

Scheduled Pinned Locked Moved Solved Installation and Deployment
linuxopensusewidgets
15 Posts 3 Posters 2.2k 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.
  • C Offline
    C Offline
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on 22 Aug 2020, 07:13 last edited by
    #4

    @continue98 said in What is required for link Widgets?:

    what the linker still lacks libraries?

    ?

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

    C 1 Reply Last reply 22 Aug 2020, 07:33
    0
    • C Christian Ehrlicher
      22 Aug 2020, 07:13

      @continue98 said in What is required for link Widgets?:

      what the linker still lacks libraries?

      ?

      C Offline
      C Offline
      continue98
      wrote on 22 Aug 2020, 07:33 last edited by
      #5

      @Christian-Ehrlicher what libraries do I need to add in order for the app to link?

      J 1 Reply Last reply 22 Aug 2020, 07:37
      0
      • C continue98
        22 Aug 2020, 07:33

        @Christian-Ehrlicher what libraries do I need to add in order for the app to link?

        J Offline
        J Offline
        JonB
        wrote on 22 Aug 2020, 07:37 last edited by
        #6

        @continue98
        I think you need to make it a lot clearer that your one word build.log is actually a link to your compiler (linker) output.....

        C 1 Reply Last reply 22 Aug 2020, 07:44
        0
        • J JonB
          22 Aug 2020, 07:37

          @continue98
          I think you need to make it a lot clearer that your one word build.log is actually a link to your compiler (linker) output.....

          C Offline
          C Offline
          continue98
          wrote on 22 Aug 2020, 07:44 last edited by
          #7

          @JonB said in What is required for link Widgets?:

          I think you need to make it a lot clearer that your one word build.log is actually a link to your compiler (linker) output.....

          What? build.log - stdout / stderr from make. What should I show?

          J 1 Reply Last reply 22 Aug 2020, 07:55
          0
          • C continue98
            22 Aug 2020, 07:44

            @JonB said in What is required for link Widgets?:

            I think you need to make it a lot clearer that your one word build.log is actually a link to your compiler (linker) output.....

            What? build.log - stdout / stderr from make. What should I show?

            J Offline
            J Offline
            JonB
            wrote on 22 Aug 2020, 07:55 last edited by JonB
            #8

            @continue98 said in What is required for link Widgets?:

            What?

            All you wrote earlier was:

            @Christian-Ehrlicher build.log. Is linked:

            I for one did not understand that the word build.log in that line was actually a hyperlink to the output from your link, showing what remains unreferenced. Maybe @Christian-Ehrlicher did notice this, maybe he did not. It took me a while to spot.

            All I am saying is, I would have indicated something like:

            Please click on this link to see what remains unreferenced when I try to link: build.log.

            C 1 Reply Last reply 22 Aug 2020, 08:39
            0
            • J JonB
              22 Aug 2020, 07:55

              @continue98 said in What is required for link Widgets?:

              What?

              All you wrote earlier was:

              @Christian-Ehrlicher build.log. Is linked:

              I for one did not understand that the word build.log in that line was actually a hyperlink to the output from your link, showing what remains unreferenced. Maybe @Christian-Ehrlicher did notice this, maybe he did not. It took me a while to spot.

              All I am saying is, I would have indicated something like:

              Please click on this link to see what remains unreferenced when I try to link: build.log.

              C Offline
              C Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on 22 Aug 2020, 08:39 last edited by
              #9

              @JonB: No I did not.

              @continue98: How did you build Qt. What build system do you use (I already asked you). From looking at your log I doubt you're correctly linking against the other static Qt libs.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              C 1 Reply Last reply 22 Aug 2020, 08:49
              1
              • C Christian Ehrlicher
                22 Aug 2020, 08:39

                @JonB: No I did not.

                @continue98: How did you build Qt. What build system do you use (I already asked you). From looking at your log I doubt you're correctly linking against the other static Qt libs.

                C Offline
                C Offline
                continue98
                wrote on 22 Aug 2020, 08:49 last edited by
                #10

                @Christian-Ehrlicher I am use build-system premake5. All libraries that I link to the project:

                "Qt5Core", 
                "Qt5Gui",
                "Qt5Widgets",
                "Qt5EventDispatcherSupport",
                "Qt5FontDatabaseSupport",
                "Qt5PlatformCompositorSupport",
                "Qt5ThemeSupport",
                "qtfreetype",
                "qtlibpng",
                "qtpcre2",
                "qtharfbuzz",
                "dl",
                "pthread"
                

                Qt configure (static build):

                ./init-repository &> init_repo.log && ./configure -debug -static -static-runtime -opensource -confirm-license -platform linux-g++-32 -qt-zlib -qt-libpng -qt-libjpeg -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -nomake examples -nomake tests -prefix "/usr/local/Qt_binary/5.15.0-gcc-static_x86/Debug" &> configure.log && sudo make -j 6 &> build.log
                
                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on 22 Aug 2020, 09:02 last edited by
                  #11

                  Sorry I don't know how to use premake and how to make sure there that the correct qmake executable and static Qt libs are used.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  C 1 Reply Last reply 22 Aug 2020, 09:17
                  0
                  • C Christian Ehrlicher
                    22 Aug 2020, 09:02

                    Sorry I don't know how to use premake and how to make sure there that the correct qmake executable and static Qt libs are used.

                    C Offline
                    C Offline
                    continue98
                    wrote on 22 Aug 2020, 09:17 last edited by continue98
                    #12

                    @Christian-Ehrlicher The problem is not in the technical part, how to use it in premake. The problem is that I don't know which libraries are still needed (undefined reference).

                    qt_libs = { 
                    	"Qt5Core", 
                    	"Qt5Gui",
                    	"Qt5Widgets",
                    	"Qt5EventDispatcherSupport",
                    	"Qt5FontDatabaseSupport",
                    	"Qt5WindowsUIAutomationSupport", // analog for Linux?
                    	"Qt5PlatformCompositorSupport",
                    	"Qt5ThemeSupport",
                    	"qtfreetype",
                    	"qtmain", // analog for Linux? 
                    	"qtlibpng",
                    	"qtpcre2",
                    	"qwindows", // analog for Linux?
                    	"qtharfbuzz"
                    }
                    links { qt_libs }
                    

                    Everything links perfectly and works (Windows 10), but Linux needs some other libraries and there is no difference at all what you use for the build system (cmake, premake, etc..). It forces GCC to link it with the -l flag anyway.

                    LIBS += -lQt5Core -lQt5Gui -lQt5Widgets -lQt5EventDispatcherSupport -lQt5FontDatabaseSupport -lQt5PlatformCompositorSupport -lQt5ThemeSupport -lqtfreetype -lqtlibpng -lqtpcre2 -lqtharfbuzz -ldl -lpthread
                    ALL_LDFLAGS += $(LDFLAGS) -L/usr/local/Qt_binary/5.15.0-gcc-static_x86/Debug/lib -L/usr/local/Qt_binary/5.15.0-gcc-static_x86/Debug/plugins/platforms -L/usr/lib32 -m32 -static -static-libstdc++
                    
                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on 22 Aug 2020, 13:43 last edited by Christian Ehrlicher
                      #13

                      @continue98 said in What is required for link Widgets?:

                      there is no difference at all what you use for the build system (cmake, premake, etc..)

                      It is - I know that I don't need to add extra libs when Qt is linked statically with cmake or qmake. So in there scripts there must be something which is not added by premake

                      /edit: and as you can see here it looks like even you added Qt5Gui, a symbol from there is not found so it must be something with the build system picking up the wrong libs or similar problems:

                      /home/continue/qt5/qtbase/src/widgets/../../include/QtGui/5.15.0/QtGui/private/../../../../../src/gui/kernel/qguiapplication_p.h:284: undefined reference to `QTouchEvent::TouchPoint::TouchPoint(QTouchEvent::TouchPoint const&)'

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      C 1 Reply Last reply 22 Aug 2020, 23:35
                      0
                      • C Christian Ehrlicher
                        22 Aug 2020, 13:43

                        @continue98 said in What is required for link Widgets?:

                        there is no difference at all what you use for the build system (cmake, premake, etc..)

                        It is - I know that I don't need to add extra libs when Qt is linked statically with cmake or qmake. So in there scripts there must be something which is not added by premake

                        /edit: and as you can see here it looks like even you added Qt5Gui, a symbol from there is not found so it must be something with the build system picking up the wrong libs or similar problems:

                        /home/continue/qt5/qtbase/src/widgets/../../include/QtGui/5.15.0/QtGui/private/../../../../../src/gui/kernel/qguiapplication_p.h:284: undefined reference to `QTouchEvent::TouchPoint::TouchPoint(QTouchEvent::TouchPoint const&)'

                        C Offline
                        C Offline
                        continue98
                        wrote on 22 Aug 2020, 23:35 last edited by continue98
                        #14

                        @Christian-Ehrlicher

                        Ok. I am enable linksgroup. Linking works now. But some error:

                        qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
                        This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                        

                        If add: Q_IMPORT_PLUGIN (QXcbIntegrationPlugin) . Some error:

                        /home/continue/qt5/qtbase/src/plugins/platforms/xcb/qxcbmain.cpp:56: undefined reference to `QXcbIntegration::QXcbIntegration(QStringList const&, int&, char**)'
                        
                        1 Reply Last reply
                        0
                        • C Offline
                          C Offline
                          Christian Ehrlicher
                          Lifetime Qt Champion
                          wrote on 23 Aug 2020, 11:53 last edited by
                          #15

                          @continue98 said in What is required for link Widgets?:

                          QXcbIntegration

                          this is a separate plugin / library which you don't link against as it seems.

                          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                          Visit the Qt Academy at https://academy.qt.io/catalog

                          1 Reply Last reply
                          0

                          13/15

                          22 Aug 2020, 13:43

                          • Login

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