set GYP_MSVS_VERSION=2015
set PATH=F:\workspace_cef\cef2623.1396\depot_tools;%PATH%
f:
cd F:\workspace_cef\cef2623.1396\chromium\src\cef
cef_create_projects.bat
set PATH=F:\workspace_cef\cef2623.1396\depot_tools;%PATH%
cd F:\workspace_cef\cef2623.1396\chromium\src\out\Release
遇到异常:
1、
ninja: build stopped: subcommand failed.
查找异常:
ninja -C . chrome|findstr error
--ninja: error: '../../native_client/toolchain/win_x86/pnacl_newlib/pnacl_newlib.json', needed by 'gen/tc_irt/lib64/libppapi_proxy_nacl.a', missing and no known rule to make it
执行单job模式,检查到底是编译到哪里报错了:
ninja -j 1
发现在ninja: build stopped: subcommand failed.之前发现fatal error C1021: 无效的预处理器命 令“must”异常,打开代码D:\cef\cef2632.1396\chromium\src\third_party\swiftshader\include\EGL\eglext.h,64行
将64行# must define type,改为/*must define type*/,重新编译即可
2、
异常:
正在创建库 libcef.dll.lib 和对象 libcef.dll.exp
ffmpeg.lib(ffmpeg.wavdec.obj) : error LNK2001: 无法解析的外部符号 _ff_w64_guid_data
Release下链接错误
[html] view plain copy
ffmpeg.lib(ffmpeg.wavdec.obj) : error LNK2001: unresolved external symbol _ff_w64_guid_data
chromium/third_party/ffmpeg /ffmpeg_generated.gni
"libavformat/vorbiscomment.c",
改成
"libavformat/vorbiscomment.c",
"libavformat/w64.c",
chromium/third_party/ffmpeg /ffmpeg_generated.gypi
'libavformat/vorbiscomment.c',
改成
'libavformat/vorbiscomment.c',
'libavformat/w64.c',
重新执行
cef_create_projects.bat
ninja
3、异常
语法错误:EGLAttrib
语法错误:EGLSync
修改文件 chromium\src\third_party\swiftshader\include\egl\eglext.h
在第一个报错前加上下面2句
typedef void *EGLSync;
typedef intptr_t EGLAttrib; // for void*