1.编译失败问题解决
①audio_device_core_win.cc(814): error C2362: “goto Exit”跳过了“volume”的初始化,此文件中出现了大量的此类错误,原因是在goto 跳转语句之后有变量在定义时初始化造成的,使用c_lang编译不会出现此问题,使用msvc编译会出现此语法问题。解决方法是变量定义跟初始化语句分开,或移动语句到goto之前。具体解决过程不再描述,下面是修改后的此文件的链接
https://download.csdn.net/download/qq_17411797/89335211
②fatal error C1189: #error: "See: bugs.webrtc.org/9213#c13."
找到对应的文件然后注释如下代码即可
#if defined(WEBRTC_WIN) && !defined(__clang__)
#error "See: bugs.webrtc.org/9213#c13."
#endif
②tool_wraaper.py提示错误UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 56: invalid continuation byte
修改方法ExecLinkWrapper中如下代码
for line in link.stdout:
line = line.decode('utf8')
if (not line.startswith(' Creating library ')
and not line.startswith('Generating code')
and not line.startswith('Finished generating code')):
print(line.rstrip())
return link.wait()
修改后为
for line in link.stdout:
#line = line.decode('latin1')
if (not line.startswith(b' Creating library ')
and not line.startswith(b'Generating code')
and not line.startswith(b'Finished generating code')):
print(line.rstrip())
return link.wait()
③vs打开webrtc工程后提示ninja.exe不是可执行文件
解决方法是将src\third_party\ninja\ninja.exe添加到系统环境变量path中