I am Newbie trying to build Qt5.15.1 on Windows using MinGW, but got linking error
-
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.exeThe 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 1Did I miss something in the configuration?
Do I have to install any additional software?
Please help! -
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)
-
@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
-
@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.
-
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)
-
@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! :)