Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-96771

Webengine/quicknanobrowser fails to build: undefined reference to `QApplication::QApplication(int&, char**, int)'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2.1, 6.3.0 Alpha
    • 6.2.0 RC
    • WebEngine
    • 7405ce9412e6b0bc70b2051734668c8ecca4ceb2 (qt/qtwebengine/dev) 549c12ae5352741a450d8948671d8ff0f332534e (qt/qtwebengine/6.2)

    Description

      Have Qt6.2.0 rc2 gcc binaries installed, configure and compile webengine/quicknanobrowser example. Configure passes, but compile fails:

      [1/1] Linking CXX executable quicknanobrowser
      FAILED: quicknanobrowser 
      : && /usr/bin/c++   CMakeFiles/quicknanobrowser.dir/quicknanobrowser_autogen/mocs_compilation.cpp.o CMakeFiles/quicknanobrowser.dir/main.cpp.o CMakeFiles/quicknanobrowser.dir/.rcc/qrc_resources.cpp.o CMakeFiles/quicknanobrowser.dir/.rcc/qrc_resources1.cpp.o -o quicknanobrowser  -Wl,-rpath,/home/qt/RTA/qt5/6.2.0/gcc_64/lib:  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6WebEngineQuick.so.6.2.0  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6WebEngineCore.so.6.2.0  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6Quick.so.6.2.0  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6QmlModels.so.6.2.0  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6OpenGL.so.6.2.0  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6Gui.so.6.2.0  /usr/lib/x86_64-linux-gnu/libGLX.so  /usr/lib/x86_64-linux-gnu/libOpenGL.so  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6WebChannel.so.6.2.0  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6Qml.so.6.2.0  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6Network.so.6.2.0  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6Positioning.so.6.2.0  /home/qt/RTA/qt5/6.2.0/gcc_64/lib/libQt6Core.so.6.2.0  -pthread && :
      /usr/bin/ld: CMakeFiles/quicknanobrowser.dir/main.cpp.o: in function `main':
      main.cpp:(.text+0x3c3): undefined reference to `QApplication::QApplication(int&, char**, int)'
      /usr/bin/ld: main.cpp:(.text+0x6e5): undefined reference to `QApplication::exec()'
      /usr/bin/ld: main.cpp:(.text+0x74a): undefined reference to `QApplication::~QApplication()'
      /usr/bin/ld: main.cpp:(.text+0x81f): undefined reference to `QApplication::~QApplication()
      

      Adding find_package(Qt6 OPTIONAL_COMPONENTS Widgets) to CMakeLists.txt seems to fix it.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              michal Michal Klocek
              joaijala Johanna Äijälä
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes