gpt4 book ai didi

c++ - 如何使用 Visual Studio 2017 编译 CEF 库?

转载 作者:太空宇宙 更新时间:2023-11-04 12:43:02 25 4
gpt4 key购买 nike

我遵循了 Sga 的回答 How to use Chromium Embedded Framework with Visual Studio 2017 (C++)?使用 Visual Studio 2017 编译 Cef。但是,当我按照他的步骤 7. 构建调试/发布时,出现以下错误:

Severity    Code    Description Project File    Line    Suppression State
Error LNK2019 unresolved external symbol _CLSID_WbemLocator referenced in function "bool __cdecl base::win::CreateLocalWmiConnection(bool,class Microsoft::WRL::ComPtr<struct IWbemServices> *)" (?CreateLocalWmiConnection@win@base@@YA_N_NPAV?$ComPtr@UIWbemServices@@@WRL@Microsoft@@@Z) cefsimple C:\Users\BremeyeT\source\repos\cef_binary_3.3538.1849.g458cc98_windows32\build\tests\cefsimple\cef_sandbox.lib(wmi.obj) 1
Error LNK1120 1 unresolved externals cefsimple C:\Users\BremeyeT\source\repos\cef_binary_3.3538.1849.g458cc98_windows32\build\tests\cefsimple\Debug\cefsimple.exe 1
Error LNK2019 unresolved external symbol _CLSID_WbemLocator referenced in function "bool __cdecl base::win::CreateLocalWmiConnection(bool,class Microsoft::WRL::ComPtr<struct IWbemServices> *)" (?CreateLocalWmiConnection@win@base@@YA_N_NPAV?$ComPtr@UIWbemServices@@@WRL@Microsoft@@@Z) cefclient C:\Users\BremeyeT\source\repos\cef_binary_3.3538.1849.g458cc98_windows32\build\tests\cefclient\cef_sandbox.lib(wmi.obj) 1
Error LNK1120 1 unresolved externals cefclient C:\Users\BremeyeT\source\repos\cef_binary_3.3538.1849.g458cc98_windows32\build\tests\cefclient\Debug\cefclient.exe 1
Error LNK2019 unresolved external symbol _CLSID_WbemLocator referenced in function "bool __cdecl base::win::CreateLocalWmiConnection(bool,class Microsoft::WRL::ComPtr<struct IWbemServices> *)" (?CreateLocalWmiConnection@win@base@@YA_N_NPAV?$ComPtr@UIWbemServices@@@WRL@Microsoft@@@Z) ceftests C:\Users\BremeyeT\source\repos\cef_binary_3.3538.1849.g458cc98_windows32\build\tests\ceftests\cef_sandbox.lib(wmi.obj) 1
Error LNK1120 1 unresolved externals ceftests C:\Users\BremeyeT\source\repos\cef_binary_3.3538.1849.g458cc98_windows32\build\tests\ceftests\Debug\ceftests.exe

来自 this question我了解到它与 wbemuuid.lib 有关。所以我加了

$(UniversalCRT_LibraryPath_x86)..\..\um\x86

到项目 cefclient、cefsimple 和 ceftests 的库目录,因为这是我在驱动器上找到 wbemuuid.lib 的地方。然而,Cef 库仍然没有编译成功并显示相同的错误。

我确实检查过我正在编译库的 Win32 版本并且 wbemuuid.lib 是 32 位版本。

为了获得成功的编译和链接,我还需要做什么?

最佳答案

你需要链接wbemuuid.lib

关于c++ - 如何使用 Visual Studio 2017 编译 CEF 库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53185835/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com