-
编译
WebRTC
总结
一、
安装白鸽
vpn
< br>或者其他代理
,
如果没有代理,
你的代码要成功下下
来几乎不可能,反正我搞了这么多天都没有成功过。
二、安装
SVN
工具,下载
地址:
/
三、安装
< br>git
工具,下载地址:
/
<
/p>
四、
安装
vs2013
< br>旗舰版,
下载地址
/
五、安装
depot_tools
工具,下载地
址:
/svn/trunk/tools/depot_
p>
(
1
)将工具包解压后,
< br>depot_tools
的路径加入环境变量
,很重要。
(
2
)
p>
运行两次
gclient
–
version
(这里将自动安
装
python
,
git
,
svn
等)
六、下载
WebRTC
代码:
(
1
)新建个目录,如
C:WebRTC
(
2
)使用
输入:
cd c:WebRTC
(
3
)
后输入:
gclient
config
/svn/trunk
(
p>
4
)设置产生者:
Set
GYP_GENERATORS=msvs
(
5
)设置
vs
产生者版本:<
/p>
set
GYP_MSVS_VERSION=2013
(
6
)获取工程的最新文件:
gclient sync --force
(
p>
7
)获取工程的最新文件:
gclient
runhooks --force
十二、完成编译,好吧,现在马上开始研究代码。
编译过程中如遇到问题可联系我:
QQ
:
6016168
Email
:
willian12@
编译错误集锦:
错误
:
yasm gperf
for
C:UsersmelcuDesktopwebrtctrunkbuild
Debugobjglobal_intermediatethird_p
artyy
asmx86insn_.
10> Could not open
`C:/Users/melcu/Desktop/webrtc/trunk/build/De
bug/obj/global_intermediate/third_
party
/yasm/x86insn_' for reading
10>C:Usersm
elcuDesktopwebrtctrunkthird_s(1,2021):
error MSB3721: The command
<
/p>
setup_
INTDIR=C:UsersmelcuDesk
topwebrtctrunkDebugobjyasm&& set
OUTDIR=../..buildDebug&& set
INPUTPATH=C:UsersmelcuDesktopwebrtctrunkbuildDebu
gobjglobal_intermedia
tethird_partyyasmx
86insn_ && bash -c
解决办法:
原文:
< br>/p/webrtc/issues/detail?id=197
Update: looks like x86insn_ and
x86insn_ are in my
'trunk/third_party/yasm/source/patched-
yasm' dir but the yasm build expects them
to be in 'trunk/build/[Debug/Release]/o
bj/global_intermediate/third_party/yasm'
dir. Putting them there manually yields
a successful yasm and libvpx build now :)
haven't
dug
deep
enough
yet
to
know
why
they
are
being
generated
to
the
wrong
folders
but
at least this is a workaround for us.
即手动拷贝
patched-yasm
中的
x86insn_
和
x86ins
n_
文件,
然后点击
编译,不要点击重
新编译。
错误
:
编译时,
error C2977
问题的解决办法
网文
/fresky/articles/
中的方案如下:
打开
c:program
files (x86)Microsoft Visual Studio
11.0VCincludexstddef
,把
_VARIADIC_MAX
定义成
10
。
这个方案一方面需要
Administrator
,其实是需要
System
p>
权限才能修改
Windows 8
中的
p>
System
文件,另一方面,会对所有的
C/C++
代码造成影响
其实,更简单的方法是打开
“
解决方案资源管理
器
”
,右键打开项目
“
属性
”
,在
C/C++
--
> “
预
处理器
< br>”
--
> “
预处理定义
”
中增加以下行即可:
_VARIADIC_MAX=10
错误
:
error C2220: warning treated as error -
no object file generated
在编译开关里拿掉
properties->c/c++->Treat Warinings As
errors
/WX
开关
错误:
error LNK2019: unresolved external symbol
_intel_aes_encrypt_init_128 referenced in
fu
nction _aes_InitContext
解决办法:
在
trunkthird_
目录中注释掉
USE_HW_AES
和
INTEL_GCM
并且
右键打开项目
“
属性<
/p>
”
,在
C/C++
--
> “
预处理器
”
--
> “
预处理定义
”
p>
中
取消
USE_HW_AES
和
INTEL_GCM
行即可
。
如下图:
-
-
-
-
-
-
-
-
-
上一篇:smartctl-磁盘检测工具
下一篇:公共场所双语标识翻译标准