Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Wiki Discussion
  4. Qt5 development primer
Forum Updated to NodeBB v4.3 + New Features

Qt5 development primer

Scheduled Pinned Locked Moved Wiki Discussion
166 Posts 72 Posters 210.7k Views 2 Watching
  • 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.
  • _ Offline
    _ Offline
    _dmp
    wrote on 5 Nov 2014, 14:21 last edited by
    #156

    Hi!

    I got http://download.qt-project.org/development_releases/qt/5.4/5.4.0-beta/single/qt-everywhere-opensource-src-5.4.0-beta.tar.xz

    When I compile I got errors:

    .obj/qsqldatabase.o:qsqldatabase.cpp:function QSqlDatabasePrivate::database(QString const&, bool): error: undefined reference to ‘QDebug::~QDebug()’

    .obj/qsqlfield.o:qsqlfield.cpp:function operator<<(QDebug, QSqlField const&): error: undefined reference to ‘QDebug::~QDebug()’

    .obj/qtestlog.o:qtestlog.cpp:function QTest::messageHandler(QtMsgType, QMessageLogContext const&, QString const&): error: undefined reference to ‘qFormatLogMessage(QtMsgType, QMessageLogContext const&, QString const&)’

    .obj/qnetworkaccessbackend.o:qnetworkaccessbackend.cpp:function QNetworkAccessBackend::createUploadByteDevice(): error: undefined reference to ‘QNonContiguousByteDeviceFactory::createShared(QSharedPointer<QRingBuffer>)’

    what can help here?

    I build qt for MX6 SOC.

    My config is

    @unset QTDIR
    export PATH="$PWD/qtbase/bin:$PWD/qtrepotools/bin:$PATH"
    export LIBS="$PWD:$LIBS"

    ./configure -opensource -confirm-license
    -device imx6
    -device-option CROSS_COMPILE=/usr/local/linaro-toolchain/bin/arm-linux-gnueabihf-
    -no-pch
    -no-opengl
    -no-xcb
    -opengl es2
    -make libs
    -nomake examples
    -nomake tests
    -sysroot /home/work/fs -no-gcc-sysroot
    -prefix /opt/qt5
    -v@

    1 Reply Last reply
    0
    • _ Offline
      _ Offline
      _rth_
      wrote on 16 Mar 2015, 06:47 last edited by _rth_
      #157

      Hello.

      I am trying to build Qt 5.4.1 on CentOS 5.10. Unfortunately I got stuck on step:

      yum install libxcb libxcb-devel xcb-util xcb-util-devel

      Error:

      sudo yum install libxcb libxcb-devel xcb-util xcb-util-devel
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile

      • base: mirror.nsc.liu.se
      • epel: mirror.nsc.liu.se
      • extras: mirror.nsc.liu.se
      • updates: mirror.nsc.liu.se
        Setting up Install Process
        No package libxcb available.
        No package libxcb-devel available.
        No package xcb-util available.
        No package xcb-util-devel available.
        Nothing to do
      1 Reply Last reply
      0
      • W Offline
        W Offline
        WaltPurvis
        wrote on 21 Aug 2015, 15:10 last edited by
        #158
        This post is deleted!
        1 Reply Last reply
        0
        • W werispaul
          3 Feb 2012, 10:10

          I had to use "-prefix CD\qtbase" option as described in the qt5 git readme file, to get through the configure step without errors. By not specifying the prefix, my mkspec (win32-msvc2010), was searched in "qtbase\bin" instead in "qtbase".

          In addition i had to install python, because one of the compilation steps had an python call.

          To init the QT Modules I used "git submodule init" and "git submodule update". Are there any magics behind the perl init-submodule script i'm missing (beside submodule selection and git user settings)?

          Actually i'm trying to compile the current git master using Win 7 and VS2010 without success.

          @ cl -c -FIqt_widgets_pch.h -Yuqt_widgets_pch.h -Fptmp\obj\debug_shared\QtWidgetsd_pch.pch -nologo -Zm200 -Zc:wchar_t -Zi -MDd -W3 -w34100 -w341
          89 -MP -GR -EHsc -DQT_SHARED -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_BUILD_WIDGETS_LIB -DQT_NO_USING_NAMESPACE -DQT_MAKEDLL -DQT_NO_CAST_TO_ASCI
          I -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -D_USE_MATH_DEFINES -DQT_NO_STYLE_MAC -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQ
          T_NO_STYLE_WINDOWSMOBILE -DQ_INTERNAL_QAPP_SRC -DQT_NO_DIRECTWRITE -DQT_DLL -DQT_GUI_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_H
          AVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -I"....\include\QtCore" -I"....\include\QtCore\5.0.0" -I"....\include\QtCore\5.0.0\QtCore"
          -I"....\include\QtGui\5.0.0" -I"....\include\QtGui\5.0.0\QtGui" -I"....\include\QtGui" -I"....\include" -I"....\include\QtWidgets\5.0.0" -I"....
          \include\QtWidgets\5.0.0\QtWidgets" -I"....\include\QtWidgets" -I"....\include" -I"tmp\rcc\debug_shared" -I"tmp" -I"..\3rdparty\wintab" -I"dialogs"
          -I"..\3rdparty\harfbuzz\src" -I"tmp\moc\debug_shared" -I"." -I"....\mkspecs\win32-msvc2010" -Fotmp\obj\debug_shared\ @C:\Users\vth\AppData\Local\Temp
          \nmDEE9.tmp
          qpushbutton.cpp
          c:\qt\5.0\qtbase\include\qtwidgets\5.0.0\qtwidgets\private../../../../../src/widgets/dialogs/qdialog_p.h(61) : fatal error C1083: Datei (Include) kan
          n nicht geöffnet werden: "QtGui/QPlatformDialogHelper": No such file or directory
          NMAKE : fatal error U1077: ""c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"": Rückgabe-Code "0x2"
          Stop.
          NMAKE : fatal error U1077: ""c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"": Rückgabe-Code "0x2"
          Stop.
          NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
          Stop.
          NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
          Stop.@

          Is there a nightly build process for Qt5 or kind of branch which is stable in the meaning of: at least compilable?

          I Offline
          I Offline
          iristevski
          wrote on 14 Oct 2015, 10:03 last edited by
          #159

          @werispaul did you found a solution to this compiling error: "QtGui/QPlatformDialogHelper": No such file or directory?
          I have similar problem with missing headers, when compiling Qt from git.

          1 Reply Last reply
          0
          • Z ZapB
            21 Jun 2011, 15:02

            Hey All,

            For anybody wanting to contribute to Qt5 I have started a wiki article on how to go about getting the code for the modularised Qt5 and building it.

            Please feel free to edit for other platforms or as things change during development.

            [EDIT: Updated link from nokia.com to wiki.qt.io --JKSH]

            R Offline
            R Offline
            Roumed
            wrote on 13 Jun 2019, 10:35 last edited by
            #160
            This post is deleted!
            1 Reply Last reply
            0
            • D Offline
              D Offline
              DungeonLords
              wrote on 24 May 2020, 18:06 last edited by DungeonLords
              #161

              I try build Qt 5.12 on my Ubuntu 18 with X11 on OrangePi 4 like here
              Qt soures are on qt5 folder
              build folder is parallel qt5
              I use
              cd build
              sudo ../configure -developer-build -opensource -nomake examples -namake tests -confirm-licence -skip webengine -v

              And there are errors like failed to create symbolic link 'libreduce_exports.so': Operation not permitted

              But I use sudo... Also I try use sudo su. The same. Is this error because of FAT32 file system for my qt5 and build folders?
              After make -j 4 I got build/qtbase/lib/libQt5Core.so No such file or directory

              jsulmJ 1 Reply Last reply 25 May 2020, 05:36
              0
              • D DungeonLords
                24 May 2020, 18:06

                I try build Qt 5.12 on my Ubuntu 18 with X11 on OrangePi 4 like here
                Qt soures are on qt5 folder
                build folder is parallel qt5
                I use
                cd build
                sudo ../configure -developer-build -opensource -nomake examples -namake tests -confirm-licence -skip webengine -v

                And there are errors like failed to create symbolic link 'libreduce_exports.so': Operation not permitted

                But I use sudo... Also I try use sudo su. The same. Is this error because of FAT32 file system for my qt5 and build folders?
                After make -j 4 I got build/qtbase/lib/libQt5Core.so No such file or directory

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on 25 May 2020, 05:36 last edited by
                #162

                @DungeonLords Why do you use FAT32 on Linux?
                You should not use sudo at all - put Qt sources and build folder in your home directory.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                2
                • G Offline
                  G Offline
                  Gluttony
                  wrote on 7 Aug 2020, 09:57 last edited by Gluttony 8 Jul 2020, 09:58
                  #163

                  Hi,
                  About this page: https://wiki.qt.io/Building_Qt_5_from_Git

                  • For openSUSE (I'm on Leap 15), I had to install more software than the one listed (sudo zypper install git-core gcc-c++ make), they are llvm-devel clang clang-devel mozilla-nss-devel (not sure for clang if just clang is needed or just clang-devel or both),
                  • And just out of curiosity, is there a reason why weneed run configure with ../qt5/configure and not just ./configure ?

                  Thanks

                  jsulmJ 1 Reply Last reply 7 Aug 2020, 10:40
                  1
                  • G Gluttony
                    7 Aug 2020, 09:57

                    Hi,
                    About this page: https://wiki.qt.io/Building_Qt_5_from_Git

                    • For openSUSE (I'm on Leap 15), I had to install more software than the one listed (sudo zypper install git-core gcc-c++ make), they are llvm-devel clang clang-devel mozilla-nss-devel (not sure for clang if just clang is needed or just clang-devel or both),
                    • And just out of curiosity, is there a reason why weneed run configure with ../qt5/configure and not just ./configure ?

                    Thanks

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 7 Aug 2020, 10:40 last edited by
                    #164

                    @Gluttony said in Qt5 development primer:

                    And just out of curiosity, is there a reason why weneed run configure with ../qt5/configure and not just ./configure ?

                    It is better to do out of source builds to not to pollute source tree with build artefacts.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    1
                    • B Offline
                      B Offline
                      bhagerty
                      wrote on 20 Aug 2020, 14:59 last edited by
                      #165

                      I proposed a few edits over on the wiki to clarify the business about parallel directories and shadow builds, because I found the instructions very confusing. I now think it needs yet another edit, and I wanted to run it by this forum.

                      If you follow the instructions about creating a build directory that is parallel to the source directory, you end up with two directories both in home: (1) ~/qt5, which holds the source (per the git clone instructions on the page, and (2) ~/qt5-build (or something like that), in which the source is built. Number (2) is not explicit in the existing instructions, but it has to be the intention, otherwise the command given for running configure, namely ../qt5/configure, would not work.

                      But if you build Qt inside your home directory, then when you try to run qmake naked at a prompt, you get an error:

                      qmake: could not exec '/usr/lib/qt5/bin/qmake': No such file or directory

                      The error makes sense, because if we followed directions, we didn't build Qt into /usr/lib/qt5, but instead into ~/qt5-build (or something like it). So to run qmake, we need to provide the full path (or change the PATH environment variable).

                      My question: Am I missing something? If I'm not, then I think that the wiki should be further edited to make this point about the path. But I hesitate to make yet another edit in case I am missing something. If anyone can shed some light either way, please do. If I'm right, I'll just edit the wiki page.

                      SGaistS 1 Reply Last reply 20 Aug 2020, 17:51
                      0
                      • B bhagerty
                        20 Aug 2020, 14:59

                        I proposed a few edits over on the wiki to clarify the business about parallel directories and shadow builds, because I found the instructions very confusing. I now think it needs yet another edit, and I wanted to run it by this forum.

                        If you follow the instructions about creating a build directory that is parallel to the source directory, you end up with two directories both in home: (1) ~/qt5, which holds the source (per the git clone instructions on the page, and (2) ~/qt5-build (or something like that), in which the source is built. Number (2) is not explicit in the existing instructions, but it has to be the intention, otherwise the command given for running configure, namely ../qt5/configure, would not work.

                        But if you build Qt inside your home directory, then when you try to run qmake naked at a prompt, you get an error:

                        qmake: could not exec '/usr/lib/qt5/bin/qmake': No such file or directory

                        The error makes sense, because if we followed directions, we didn't build Qt into /usr/lib/qt5, but instead into ~/qt5-build (or something like it). So to run qmake, we need to provide the full path (or change the PATH environment variable).

                        My question: Am I missing something? If I'm not, then I think that the wiki should be further edited to make this point about the path. But I hesitate to make yet another edit in case I am missing something. If anyone can shed some light either way, please do. If I'm right, I'll just edit the wiki page.

                        SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 20 Aug 2020, 17:51 last edited by
                        #166

                        @bhagerty hi and welcome to devnet,

                        What using a custom build of Qt: always use the full path to qmake. You may have the one provided by your distribution installed which will be the one invoked. One other thing you did not take into account is unless you are doing a developer build (because you want to hack on Qt) you have to call 'make install' as last step.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0

                        • Login

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