Getting "unresolved externals" error while building QtCreator



  • I am building the latest QtCreator source downloaded from git, while building I get this error:

    ..\..\..\..\lib\qtcreator\plugins\qmldesigner\qtquickplugin4.dll:-1: error: LNK1120: 1 unresolved externals
    

    I see that many many plugins get compiled but when it reaches qmldesigner plugin the compilation stops with the above error. I also notice that the qtquickplugin4.lib get created but qtquickplugin4.dll do not!
    Some compile Output log:

    qmlcache_loader.cpp
    moc_qtquickplugin.cpp
    	link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:4.9 /OUT:..\..\..\..\lib\qtcreator\plugins\qmldesigner\qtquickplugin4.dll @C:\Users\Shujaat\AppData\Local\Temp\qtquickplugin4.dll.6604.5188.jom
       Creating library ..\..\..\..\lib\qtcreator\plugins\qmldesigner\qtquickplugin4.lib and object ..\..\..\..\lib\qtcreator\plugins\qmldesigner\qtquickplugin4.exp
    qmlcache_loader.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl QQmlPrivate::qmlregister(enum QQmlPrivate::RegistrationType,void *)" (__imp_?qmlregister@QQmlPrivate@@YAHW4RegistrationType@1@PEAX@Z) referenced in function "public: __cdecl `anonymous namespace'::Registry::Registry(void)" (??0Registry@?A0xeb5bf69e@@QEAA@XZ)
    ..\..\..\..\lib\qtcreator\plugins\qmldesigner\qtquickplugin4.dll : fatal error LNK1120: 1 unresolved externals
    jom: F:\qtcreator\1\build-qtcreator-Desktop_Qt_5_12_1_MSVC2017_64bit-Release\src\plugins\qmldesigner\qtquickplugin\Makefile.Release [..\..\..\..\lib\qtcreator\plugins\qmldesigner\qtquickplugin4.dll] Error 1120
    jom: F:\qtcreator\1\build-qtcreator-Desktop_Qt_5_12_1_MSVC2017_64bit-Release\src\plugins\qmldesigner\qtquickplugin\Makefile [release] Error 2
    jom: F:\qtcreator\1\build-qtcreator-Desktop_Qt_5_12_1_MSVC2017_64bit-Release\src\plugins\qmldesigner\Makefile [sub-qtquickplugin-make_first-ordered] Error 2
    14:24:54: The process "F:\Qt\Qt5.12.1\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project qtcreator (kit: Desktop Qt 5.12.1 MSVC2017 64bit)
    The kit Desktop Qt 5.12.1 MSVC2017 64bit has configuration issues which might be the root cause for this problem.
    When executing step "Make"
    14:24:54: Elapsed time: 04:43.
    


  • Hi, this error has been around for some time :-(
    There might be a solution here



  • When building with Qt Creator, you have to disable the QtQuick compiler in the qmake build step. Simply unchecking the checkbox and rebuilding solved the problem.



  • @Eager This solution worked for me thanks!