My qmake-generated Visual studio project is complaining about the following 
QObject symbols referenced from my QObject subclass even though I am linking to 
Qt5Core.lib using a qt I built from the command line:


1>CUtil.obj : error LNK2001: unresolved external symbol "public: virtual void 
__thiscall QObject::timerEvent(class QTimerEvent *)" 
(?timerEvent@QObject@@UAEXPAVQTimerEvent@@@Z)
1>CUtil_win32.obj : error LNK2001: unresolved external symbol "public: virtual 
void __thiscall QObject::timerEvent(class QTimerEvent *)" 
(?timerEvent@QObject@@UAEXPAVQTimerEvent@@@Z)
1>sip_cutilAppFilter.obj : error LNK2001: unresolved external symbol "public: 
virtual void __thiscall QObject::timerEvent(class QTimerEvent *)" 
(?timerEvent@QObject@@UAEXPAVQTimerEvent@@@Z)
1>CUtil.obj : error LNK2001: unresolved external symbol "public: virtual void 
__thiscall QObject::childEvent(class QChildEvent *)" 
(?childEvent@QObject@@UAEXPAVQChildEvent@@@Z)
1>CUtil_win32.obj : error LNK2001: unresolved external symbol "public: virtual 
void __thiscall QObject::childEvent(class QChildEvent *)" 
(?childEvent@QObject@@UAEXPAVQChildEvent@@@Z)
1>sip_cutilAppFilter.obj : error LNK2001: unresolved external symbol "public: 
virtual void __thiscall QObject::childEvent(class QChildEvent *)" 
(?childEvent@QObject@@UAEXPAVQChildEvent@@@Z)
1>CUtil.obj : error LNK2001: unresolved external symbol "public: virtual void 
__thiscall QObject::customEvent(class QEvent *)" 
(?customEvent@QObject@@UAEXPAVQEvent@@@Z)
1>CUtil_win32.obj : error LNK2001: unresolved external symbol "public: virtual 
void __thiscall QObject::customEvent(class QEvent *)" 
(?customEvent@QObject@@UAEXPAVQEvent@@@Z)
1>sip_cutilAppFilter.obj : error LNK2001: unresolved external symbol "public: 
virtual void __thiscall QObject::customEvent(class QEvent *)" 
(?customEvent@QObject@@UAEXPAVQEvent@@@Z)
1>CUtil.obj : error LNK2001: unresolved external symbol "public: virtual void 
__thiscall QObject::connectNotify(class QMetaMethod const &)" 
(?connectNotify@QObject@@UAEXABVQMetaMethod@@@Z)
1>CUtil_win32.obj : error LNK2001: unresolved external symbol "public: virtual 
void __thiscall QObject::connectNotify(class QMetaMethod const &)" 
(?connectNotify@QObject@@UAEXABVQMetaMethod@@@Z)
1>sip_cutilAppFilter.obj : error LNK2001: unresolved external symbol "public: 
virtual void __thiscall QObject::connectNotify(class QMetaMethod const &)" 
(?connectNotify@QObject@@UAEXABVQMetaMethod@@@Z)
1>CUtil.obj : error LNK2001: unresolved external symbol "public: virtual void 
__thiscall QObject::disconnectNotify(class QMetaMethod const &)" 
(?disconnectNotify@QObject@@UAEXABVQMetaMethod@@@Z)
1>CUtil_win32.obj : error LNK2001: unresolved external symbol "public: virtual 
void __thiscall QObject::disconnectNotify(class QMetaMethod const &)" 
(?disconnectNotify@QObject@@UAEXABVQMetaMethod@@@Z)
1>sip_cutilAppFilter.obj : error LNK2001: unresolved external symbol "public: 
virtual void __thiscall QObject::disconnectNotify(class QMetaMethod const &)" 
(?disconnectNotify@QObject@@UAEXABVQMetaMethod@@@Z)


The output of dumpbin /symbols /linenumbers Qt5Core.lib shows these symbols as 
protected, not public as referenced above


516 00000000 UNDEF  notype ()    External     | 
?timerEvent@QObject@@MAEXPAVQTimerEvent@@@Z (protected: virtual void __thiscall 
QObject::timerEvent(class QTimerEvent *))
517 00000000 UNDEF  notype ()    External     | 
?childEvent@QObject@@MAEXPAVQChildEvent@@@Z (protected: virtual void __thiscall 
QObject::childEvent(class QChildEvent *))


But then, maybe the public/private status of these isn’t the problem.

Anyone have any idea what might be causing this? Here is my linker command line:


OUT:"release\\Family Diagram.exe" /MANIFEST /NXCOMPAT /PDB:"release\Family 
Diagram.pdb" /DYNAMICBASE "Y:\dev\vendor\sysroot-win-32\qt\lib\qtmain.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\Qt.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtCore.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtGui.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtLocation.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtNetwork.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtPositioning.lib"
 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtPrintSupport.lib"
 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtPurchasing.lib"
 "Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtQml.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtQuick.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtQuickWidgets.lib"
 "Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtWidgets.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python36.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\sip.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\printsupport\windowsprintersupport.lib"
 "Y:\dev\vendor\sysroot-win-32\qt\plugins\styles\qwindowsvistastyle.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\geoservices\qtgeoservices_esri.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\geoservices\qtgeoservices_itemsoverlay.lib"
 "Y:\dev\vendor\sysroot-win-32\qt\plugins\geoservices\qtgeoservices_mapbox.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\geoservices\qtgeoservices_nokia.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\geoservices\qtgeoservices_osm.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5Concurrent.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\scenegraph\qsgd3d12backend.lib" 
"dxgi.lib" "d3d12.lib" "d3dcompiler.lib" "dcomp.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\platforms\qwindows.lib" "imm32.lib" 
"oleaut32.lib" "shlwapi.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5EventDispatcherSupport.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5FontDatabaseSupport.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\qtfreetype.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5ThemeSupport.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5AccessibilitySupport.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5WindowsUIAutomationSupport.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\imageformats\qgif.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\imageformats\qico.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\imageformats\qjpeg.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling\qmldbg_debugger.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling\qmldbg_inspector.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling\qmldbg_local.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling\qmldbg_messages.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling\qmldbg_native.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling\qmldbg_nativedebugger.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling\qmldbg_profiler.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling\qmldbg_quickprofiler.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling\qmldbg_server.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5PacketProtocol.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling\qmldbg_tcp.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\bearer\qgenericbearer.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\position\qtposition_geoclue.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5DBus.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\position\qtposition_positionpoll.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\plugins\position\qtposition_winrt.lib" 
"runtimeobject.lib" "Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5PrintSupport.lib" 
"winspool.lib" "comdlg32.lib" "gdi32.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5QuickWidgets.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5Widgets.lib" "uxtheme.lib" "dwmapi.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5Location.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5PositioningQuick.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5Purchasing.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5Positioning.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\clip2tri.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\poly2tri.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\clipper.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\qml\QtQuick.2\qtquick2plugin.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5Quick.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5Gui.lib" "libEGL.lib" "libGLESv2.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\qtlibpng.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\qtharfbuzz.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5Qml.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5Network.lib" "dnsapi.lib" 
"iphlpapi.lib" "crypt32.lib" "Y:\dev\vendor\sysroot-win-32\lib\libssl.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\libcrypto.lib" "Gdi32.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\Qt5Core.lib" "mpr.lib" "netapi32.lib" 
"userenv.lib" "version.lib" "ws2_32.lib" "kernel32.lib" "user32.lib" 
"shell32.lib" "uuid.lib" "ole32.lib" "advapi32.lib" "winmm.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\qtpcre2.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\libEGL.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\libGLESv2.lib" "d3d9.lib" "dxguid.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\translator.lib" 
"Y:\dev\vendor\sysroot-win-32\qt\lib\preprocessor.lib" "odbc32.lib" 
"odbccp32.lib" /MACHINE:X86 /SAFESEH /INCREMENTAL:NO /PGD:"release\Family 
Diagram.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' 
uiAccess='false'" /ManifestFile:"release\Family 
Diagram.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\lib" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\lib" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\plugins\printsupport" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\plugins\styles" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\plugins\geoservices" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\plugins\scenegraph" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\plugins\platforms" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\plugins\imageformats" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\plugins\qmltooling" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\plugins\bearer" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\plugins\position" 
/LIBPATH:"Y:\dev\vendor\sysroot-win-32\qt\qml\QtQuick.2" /TLBID:1 

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to