I followed Sga's answer How to use Chromium Embedded Framework with Visual Studio 2017 (C++)? to compile Cef with Visual Studio 2017. However, when I follow his step 7. Build Debug/Release, I am getting the following errors:
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
From this question I learned that it has to do with wbemuuid.lib. So I added
$(UniversalCRT_LibraryPath_x86)..\\..\\um\\x86
to the Library Directories of the projects cefclient, cefsimple and ceftests, because this is where I found wbemuuid.lib on my drive. However the Cef library still does not compile successfully and shows the same errors.
I did check that I am compiling the Win32 version of the library and the wbemuuid.lib is the 32 bit version.
What else do I need to do to get a sucessful compile and link?
您需要与wbemuuid.lib链接
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.