QWT-6.20 In function WinMain: undefined reference to qMain Qt 5.15.2 mingw810_64
Solved
3rd Party Software
-
I'm trying to compile qwt on Windows, like explained here:
https://qwt.sourceforge.io/qwtinstall.htmlI've downloaded and extracted qwt, and then given these commands:
cd Downloads\qwt-6.2.0\qwt-6.2.0 qmake qwt.pro mingw32-make
After a few seconds, I see this error:
mingw32-make[3]: Entering directory 'C:/Users/cedric/Downloads/qwt-6.2.0/qwt-6.2.0/tests/splinetest' linking ../bin/splinetest.exe C:\Qt\5.15.2\mingw81_64\lib\libqtmain.a(qtmain_win.o): In function `WinMain': C:\Users\qt\work\qt\qtbase\src\winmain/qtmain_win.cpp:97: undefined reference to `qMain(int, char**)' collect2.exe: error: ld returned 1 exit status mingw32-make[3]: *** [Makefile.Release:68: ../bin/splinetest.exe] Error 1 mingw32-make[3]: Leaving directory 'C:/Users/cedric/Downloads/qwt-6.2.0/qwt-6.2.0/tests/splinetest' mingw32-make[2]: *** [Makefile:49: release-all] Error 2 mingw32-make[2]: Leaving directory 'C:/Users/cedric/Downloads/qwt-6.2.0/qwt-6.2.0/tests/splinetest' mingw32-make[1]: *** [Makefile:51: sub-splinetest-make_first] Error 2 mingw32-make[1]: Leaving directory 'C:/Users/cedric/Downloads/qwt-6.2.0/qwt-6.2.0/tests' mingw32-make: *** [Makefile:314: sub-tests-make_first-ordered] Error 2
My versions:
qwt 6.2.0 qt 5.15.2 mingw810_64
-
Hi and welcome to devnet,
Unless you are going to hack on Qwt, just disable the tests building.
-
@SGaist Thank you, that solved it. After extracting the files, I edited qwt.pro, and commented out the lines that run the tests:
################################################################ # Qwt Widget Library # Copyright (C) 1997 Josef Wilgen # Copyright (C) 2002 Uwe Rathmann # # This library is free software; you can redistribute it and/or # modify it under the terms of the Qwt License, Version 1.0 ################################################################ lessThan(QT_MAJOR_VERSION, 5) { lessThan(QT_MINOR_VERSION, 8) { error(Qt >= 4.8 required.) } } include( qwtconfig.pri ) TEMPLATE = subdirs CONFIG += ordered SUBDIRS = \ src \ classincludes \ doc contains(QWT_CONFIG, QwtDesigner ) { SUBDIRS += designer } contains(QWT_CONFIG, QwtExamples ) { SUBDIRS += examples } contains(QWT_CONFIG, QwtPlayground ) { SUBDIRS += playground } #contains(QWT_CONFIG, QwtTests ) { # SUBDIRS += tests #} qwtspec.files = qwtconfig.pri qwtfunctions.pri qwt.prf qwtspec.path = $${QWT_INSTALL_FEATURES} INSTALLS += qwtspec
After that the below steps run without problems:
qmake qwt.pro mingw32-make -j 6 mingw32-make install
-
-