在VS2017里面写Qt5.9.2的项目,创建了一个新的Qt GUI 的项目, 但是却发现有一个关于怀疑.lib有关的问题。
具体错误如下:
1>qtmaind.lib(qtmain_winrt.obj) : error LNK2019: 无法解析的外部符号 __imp__RoInitialize@4,该符号在函数 _WinMain@16 中被引用
1>qtmaind.lib(qtmain_winrt.obj) : error LNK2019: 无法解析的外部符号 __imp__RoGetActivationFactory@12,该符号在函数 "public: __thiscall AppContainer::AppContainer(void)" (??0AppContainer@@QAE@XZ) 中被引用
1>qtmaind.lib(qtmain_winrt.obj) : error LNK2019: 无法解析的外部符号 _WindowsCreateStringReference@16,该符号在函数 "private: void __thiscall Microsoft::WRL::Wrappers::HStringReference::CreateReference(wchar_t const *,unsigned int,unsigned int)" (?CreateReference@HStringReference@Wrappers@WRL@Microsoft@@AAEXPB_WII@Z) 中被引用
1>qtmaind.lib(qtmain_winrt.obj) : error LNK2019: 无法解析的外部符号 _WindowsDeleteString@4,该符号在函数 "public: void __thiscall Microsoft::WRL::Wrappers::HString::Release(void)" (?Release@HString@Wrappers@WRL@Microsoft@@QAEXXZ) 中被引用
1>qtmaind.lib(qtmain_winrt.obj) : error LNK2019: 无法解析的外部符号 _WindowsGetStringRawBuffer@8,该符号在函数 "public: wchar_t const * __thiscall Microsoft::WRL::Wrappers::HString::GetRawBuffer(unsigned int *)const " (?GetRawBuffer@HString@Wrappers@WRL@Microsoft@@QBEPB_WPAI@Z) 中被引用
1>qtmaind.lib(qtmain_winrt.obj) : error LNK2019: 无法解析的外部符号 _RoOriginateError@8,该符号在函数 "public: static void __cdecl Microsoft::WRL::ErrorHelper<0>::OriginateError(long,struct HSTRING__ *)" (?OriginateError@?$ErrorHelper@$0A@@WRL@Microsoft@@SAXJPAUHSTRING__@@@Z) 中被引用
1>D:\New Projects\VS_Project\QtGuiApplication7\Win32\Debug\\QtGuiApplication7.exe : fatal error LNK1120: 6 个无法解析的外部命令
1>已完成生成项目“QtGuiApplication7.vcxproj”的操作 - 失败。
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
在这里以其中一条具体的为例子:1>qtmaind.lib(qtmain_winrt.obj) : error LNK2019: 无法解析的外部符号 __imp__RoInitialize@4,该符号在函数 _WinMain@16 中被引用
百度许多文章,发现大部分都是说缺少对应得.lib或者.h的文件, 但是我查看该项目的属性,发现是有qtmaind.lib这个库的,但是问什么还是有错误呢?
百思不得七姐~~
有没有大牛可以指点一下》》》