5.14.1+msvc2017。
一般debug不会出来,release就出来这2个错误了:
qmlcache_loader.obj:-1: error: LNK2019: 无法解析的外部符号 "__declspec(dllimport) int __cdecl QQmlPrivate::qmlregister(enum QQmlPrivate::RegistrationType,void *)" (__imp_?qmlregister@QQmlPrivate@@YAHW4RegistrationType@1@PAX@Z),该符号在函数 "public: __thiscall `anonymous namespace'::Registry::Registry(void)" (??0Registry@?A0x0bf3abb2@@QAE@XZ) 中被引用
qmlcache_loader.obj:-1: error: LNK2019: 无法解析的外部符号 "__declspec(dllimport) void __cdecl QQmlPrivate::qmlunregister(enum QQmlPrivate::RegistrationType,unsigned int)" (__imp_?qmlunregister@QQmlPrivate@@YAXW4RegistrationType@1@I@Z),该符号在函数 "void __cdecl `struct Q_QGS_unitRegistry::Registry * __cdecl Q_QGS_unitRegistry::`anonymous namespace'::Q_QGS_unitRegistry::innerFunction(void)'::`2'::`dynamic atexit destructor for 'holder''(void)" (??__Fholder@?1??innerFunction@Q_QGS_unitRegistry@?A0x0bf3abb2@2@YAPAURegistry@2@XZ@YAXXZ) 中被引用
后来对比了下, 是资源里面有qml文件导致的。
后来到如下位置干掉选项就好了: