Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I am Newbie trying to build Qt5.15.1 on Windows using MinGW, but got linking error

I am Newbie trying to build Qt5.15.1 on Windows using MinGW, but got linking error

Scheduled Pinned Locked Moved Solved General and Desktop
mingw64building qtwindows 10newbie
6 Posts 2 Posters 938 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.
  • M Offline
    M Offline
    mayita
    wrote on 24 May 2021, 13:43 last edited by mayita
    #1

    I have to compile a Qt project that uses qcustomplot. The project was created using Qt5.15.1. Newer versions of Qt are incompatible with qcustomplot. I tried to build the project with Qt5.12.10 but the project uses QVector extensively and therefore I need to use a more recent version of Qt. I decided to build Qt from source, after all it has been done thousands of times by others, there are many guides showing how to do it, what can go wrong? but it did go wrong ...

    The computer has Windows 10. I installed mingw-w64, Perl, Python and Ruby. I did not install Windows SDK 10 or DirectX SDK.

    The environment variable Path is: C:\Python3\DLLs;C:\Python3\Scripts;C:\Python3\Tools\ninja;C:\Python3\Tools;C:\Python3;C:\Perl64\bin;C:\Users\labmz\AppData\Roaming\ActiveState\bin;C:\Qt\Qt5.12.10\5.12.10\Src\gnuwin32\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\MATLAB\R2020b\runtime\win64;C:\Program Files\MATLAB\R2020b\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;
    I have mingw-w64 lib in LIBRARY_PATH.

    In a command window:
    configure -release -nomake tests -prefix %CD%\qtbase -skip qtwebengine -opensource -opengl desktop
    mingw32-make.exe

    The compilation goes well but I get an ld error:
    g++ -Wl,-s -shared -Wl,-subsystem,windows -Wl,--out-implib,C:\Qt\Qt5.15.1\qtbase\qml\QtQml\libqmlplugin.a -o C:\Qt\Qt5.15.1\qtbase\qml\QtQml\qmlplugin.dll .obj/release/plugin.o C:\Qt\Qt5.15.1\qtbase\lib\libQt5QmlModels.a C:\Qt\Qt5.15.1\qtbase\lib\libQt5Qml.a C:\Qt\Qt5.15.1\qtbase\lib\libQt5Network.a C:\Qt\Qt5.15.1\qtbase\lib\libQt5Core.a .obj\release\qmlplugin_resource_res.o
    .obj/release/plugin.o:plugin.cpp:(.text+0xee): undefined reference to `_imp___Z24qml_register_types_QtQmlv'
    collect2.exe: error: ld returned 1 exit status
    mingw32-make.exe[5]: *** [Makefile.Release:68: C:/Qt/Qt5.15.1/qtbase/qml/QtQml/qmlplugin.dll] Error 1

    Did I miss something in the configuration?
    Do I have to install any additional software?
    Please help!

    V 1 Reply Last reply 24 May 2021, 14:09
    0
    • V Offline
      V Offline
      VRonin
      wrote on 24 May 2021, 14:54 last edited by
      #4

      That is an old post, the latest version of qtcustomplot is compatible with all Qt 5.x versions as well as 6.0 (see https://www.qcustomplot.com/release/2.1.0fixed/changelog.txt)

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      M 2 Replies Last reply 24 May 2021, 15:06
      2
      • M mayita
        24 May 2021, 13:43

        I have to compile a Qt project that uses qcustomplot. The project was created using Qt5.15.1. Newer versions of Qt are incompatible with qcustomplot. I tried to build the project with Qt5.12.10 but the project uses QVector extensively and therefore I need to use a more recent version of Qt. I decided to build Qt from source, after all it has been done thousands of times by others, there are many guides showing how to do it, what can go wrong? but it did go wrong ...

        The computer has Windows 10. I installed mingw-w64, Perl, Python and Ruby. I did not install Windows SDK 10 or DirectX SDK.

        The environment variable Path is: C:\Python3\DLLs;C:\Python3\Scripts;C:\Python3\Tools\ninja;C:\Python3\Tools;C:\Python3;C:\Perl64\bin;C:\Users\labmz\AppData\Roaming\ActiveState\bin;C:\Qt\Qt5.12.10\5.12.10\Src\gnuwin32\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\MATLAB\R2020b\runtime\win64;C:\Program Files\MATLAB\R2020b\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;
        I have mingw-w64 lib in LIBRARY_PATH.

        In a command window:
        configure -release -nomake tests -prefix %CD%\qtbase -skip qtwebengine -opensource -opengl desktop
        mingw32-make.exe

        The compilation goes well but I get an ld error:
        g++ -Wl,-s -shared -Wl,-subsystem,windows -Wl,--out-implib,C:\Qt\Qt5.15.1\qtbase\qml\QtQml\libqmlplugin.a -o C:\Qt\Qt5.15.1\qtbase\qml\QtQml\qmlplugin.dll .obj/release/plugin.o C:\Qt\Qt5.15.1\qtbase\lib\libQt5QmlModels.a C:\Qt\Qt5.15.1\qtbase\lib\libQt5Qml.a C:\Qt\Qt5.15.1\qtbase\lib\libQt5Network.a C:\Qt\Qt5.15.1\qtbase\lib\libQt5Core.a .obj\release\qmlplugin_resource_res.o
        .obj/release/plugin.o:plugin.cpp:(.text+0xee): undefined reference to `_imp___Z24qml_register_types_QtQmlv'
        collect2.exe: error: ld returned 1 exit status
        mingw32-make.exe[5]: *** [Makefile.Release:68: C:/Qt/Qt5.15.1/qtbase/qml/QtQml/qmlplugin.dll] Error 1

        Did I miss something in the configuration?
        Do I have to install any additional software?
        Please help!

        V Offline
        V Offline
        VRonin
        wrote on 24 May 2021, 14:09 last edited by
        #2

        @mayita said in I am Newbie trying to build Qt5.15.1 on Windows using MinGW, but got linking error:

        Qt5.12.10 but the project uses QVector extensively and therefore I need to use a more recent version of Qt

        ???

        I decided to build Qt from source

        Why?! just run the maintenance tool and download the new version

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        M 1 Reply Last reply 24 May 2021, 14:45
        0
        • V VRonin
          24 May 2021, 14:09

          @mayita said in I am Newbie trying to build Qt5.15.1 on Windows using MinGW, but got linking error:

          Qt5.12.10 but the project uses QVector extensively and therefore I need to use a more recent version of Qt

          ???

          I decided to build Qt from source

          Why?! just run the maintenance tool and download the new version

          M Offline
          M Offline
          mayita
          wrote on 24 May 2021, 14:45 last edited by mayita
          #3

          @VRonin said in I am Newbie trying to build Qt5.15.1 on Windows using MinGW, but got linking error:

          Why?! just run the maintenance tool and download the new version

          because of qcustomplot, it is only compatible with Qt5.12, as I found in https://www.qcustomplot.com/index.php/support/forum/2251. I believe it can be compiled with Qt5.15.1.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            VRonin
            wrote on 24 May 2021, 14:54 last edited by
            #4

            That is an old post, the latest version of qtcustomplot is compatible with all Qt 5.x versions as well as 6.0 (see https://www.qcustomplot.com/release/2.1.0fixed/changelog.txt)

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            M 2 Replies Last reply 24 May 2021, 15:06
            2
            • V VRonin
              24 May 2021, 14:54

              That is an old post, the latest version of qtcustomplot is compatible with all Qt 5.x versions as well as 6.0 (see https://www.qcustomplot.com/release/2.1.0fixed/changelog.txt)

              M Offline
              M Offline
              mayita
              wrote on 24 May 2021, 15:06 last edited by
              #5

              @VRonin thanks, I'll try that.

              1 Reply Last reply
              0
              • V VRonin
                24 May 2021, 14:54

                That is an old post, the latest version of qtcustomplot is compatible with all Qt 5.x versions as well as 6.0 (see https://www.qcustomplot.com/release/2.1.0fixed/changelog.txt)

                M Offline
                M Offline
                mayita
                wrote on 25 May 2021, 02:14 last edited by
                #6

                @VRonin said in I am Newbie trying to build Qt5.15.1 on Windows using MinGW, but got linking error:

                That is an old post, the latest version of qcustomplot is compatible with all Qt 5.x versions as well as 6.0 (see https://www.qcustomplot.com/release/2.1.0fixed/changelog.txt)

                You were right. I missed the latest qcustomplot update in March.
                Thanks! :)

                1 Reply Last reply
                0

                2/6

                24 May 2021, 14:09

                topic:navigator.unread, 4
                • Login

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