QWT Link Error on Windows
Solved
3rd Party Software
-
Greetings,
Building a simple QWT application with QT 5.15.0 and MSVC2019 on Windows,
getting this error while link time. (QWT 6.1.5 built and installed). I can see the QT designer plugin also in QT creator.The QWT examples do run fine, It's just my code that behaves odd.
I cant see anything obvious in my .pro file ..
QT += core gui widgets mqtt network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui DEFINES += QWT_DLL QWT_ROOT += C:/Qwt-6.1.5 QWT_LIBS += -L$${QWT_ROOT}/lib QWT_INCLUDES = $${QWT_ROOT}/include INCLUDEPATH += $${QWT_INCLUDES} LIBS += $${QWT_LIBS} CONFIG (debug, debug | release) { LIBS += -lqwtd } else { LIBS += -qwt } # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
Much appreciated, any ideas/suggestions.
Thanks,
Manu
C:\Qt\5.15.0\msvc2019_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQWT_DLL -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_MQTT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB --compiler-flavor=msvc --include "D:/Work/Test Apps/QT_MQTT_Sub_UI/build-QT_Sub_UI_1-Desktop_Qt_5_15_0_MSVC2019_64bit-Debug/debug/moc_predefs.h" -IC:/Qt/5.15.0/msvc2019_64/mkspecs/win32-msvc -I"D:/Work/Test Apps/QT_MQTT_Sub_UI/QT_Sub_UI_1" -IC:/Qwt-6.1.5/include -IC:/Qt/5.15.0/msvc2019_64/include -IC:/Qt/5.15.0/msvc2019_64/include/QtWidgets -IC:/Qt/5.15.0/msvc2019_64/include/QtGui -IC:/Qt/5.15.0/msvc2019_64/include/QtANGLE -IC:/Qt/5.15.0/msvc2019_64/include/QtMqtt -IC:/Qt/5.15.0/msvc2019_64/include/QtNetwork -IC:/Qt/5.15.0/msvc2019_64/include/QtCore -I. -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\ATLMFC\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" ..\QT_Sub_UI_1\mainwindow.h -o debug\moc_mainwindow.cpp cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc /Fddebug\QT_Sub_UI_1.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQWT_DLL -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_MQTT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\QT_Sub_UI_1 -I. -IC:\Qwt-6.1.5\include -IC:\Qt\5.15.0\msvc2019_64\include -IC:\Qt\5.15.0\msvc2019_64\include\QtWidgets -IC:\Qt\5.15.0\msvc2019_64\include\QtGui -IC:\Qt\5.15.0\msvc2019_64\include\QtANGLE -IC:\Qt\5.15.0\msvc2019_64\include\QtMqtt -IC:\Qt\5.15.0\msvc2019_64\include\QtNetwork -IC:\Qt\5.15.0\msvc2019_64\include\QtCore -Idebug -I. -I/include -IC:\Qt\5.15.0\msvc2019_64\mkspecs\win32-msvc -Fodebug\ @C:\Users\Manu\AppData\Local\Temp\moc_mainwindow.obj.4656.577.jom moc_mainwindow.cpp link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\QT_Sub_UI_1.exe @C:\Users\Manu\AppData\Local\Temp\QT_Sub_UI_1.exe.4656.3588.jom moc_mainwindow.obj : error LNK2019: unresolved external symbol "private: void __cdecl MainWindow::on_qwtPlot_itemAttached(class QwtPlotItem *,bool)" (?on_qwtPlot_itemAttached@MainWindow@@AEAAXPEAVQwtPlotItem@@_N@Z) referenced in function "private: static void __cdecl MainWindow::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@MainWindow@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z) debug\QT_Sub_UI_1.exe : fatal error LNK1120: 1 unresolved externals jom: D:\Work\Test Apps\QT_MQTT_Sub_UI\build-QT_Sub_UI_1-Desktop_Qt_5_15_0_MSVC2019_64bit-Debug\Makefile.Debug [debug\QT_Sub_UI_1.exe] Error 1120 jom: D:\Work\Test Apps\QT_MQTT_Sub_UI\build-QT_Sub_UI_1-Desktop_Qt_5_15_0_MSVC2019_64bit-Debug\Makefile [debug] Error 2 00:22:18: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2. Error while building/deploying project QT_Sub_UI_1 (kit: Desktop Qt 5.15.0 MSVC2019 64bit) When executing step "Make" 00:22:18: Elapsed time: 00:05.
-
Hi,
Maybe a silly question but did you implement the function in question ?
-
Thanks for the question.
That made me search for the function. I had never implemented a function by that name.
Searching, I found the reference in mainwindow.h, private slots.
I have no clue, how it landed in there.Removing it , fixed the issue.
Argh, I was really pulling out hair.
Thanks!
Manu