下载cef
下载地址:https://cef-builds.spotifycdn.com/index.html
对应自己系统的下载对应的版本,因项目需求下载的是5112版本:cef_binary_104.4.26+g4180781+chromium-104.0.5112.102_windows64.tar.bz2
编译
- 将下载好的压缩包加压后 使用cmake生成sln;
- 使用vs2022打开sln后即可进行编译
遇到的问题
因为本机环境为vs2017,在编译过程中报错:C2440 “初始化”: 无法从“R (__cdecl *)(base::internal::BindStateBase *,conditional<_Test,const std::string&,const std::string&>::type)”转换为“PolymorphicInvoke”
后查询https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding查到5112分支的开发环境为vs2019,然后尝试了一下vs2022也没有这个问题。