我正在尝试在 VS2013 中构建和调试最新版本的 WebRTC。尽管直接使用 ninja(例如 ninja -C out\Debug)可以正常工作,但从 VS2013 内部构建失败。理想情况下,我想在 VS2013 中编辑、启动构建和调试:
If you do a system install of VS2013, you can use it for editing and debugging. ninja will still use the depot_tools version to build. This is preferred as it's automatically kept up-to-date as build requirements change.
我已按照此处描述的步骤进行操作:
http://www.chromium.org/developers/how-tos/build-instructions-windows#TOC-Setting-up-the-environment-for-Visual-Studio-2013
我设置了这个环境变量:
GYP_GENERATORS=msvs-ninja,ninja
我运行了以下命令:
C:\dev\webrtc>gclient runhooks
(在命令结束时,我收到一些“警告:转换为 MSBuild 时无法识别的工具 MASM。”警告)
更新:如果我删除 GYP_GENERATORS 设置并再次运行“gclient runhooks”,这些警告就会消失。
然后我在 VS2013 中打开“C:\dev\webrtc\trunk\all.sln”并尝试重建“peerconnection_client”项目。但它失败并出现以下错误:
Error 1 error : loading 'build.ninja': No such file or directory C:\dev\webrtc\trunk\talk\ninja
Error 2 error MSB3073: The command "call ninja.exe -C trunk\out\Debug\ -t clean peerconnection_client" exited with code 1. C:\dev\webrtc\trunk\talk\peerconnection_client.vcxproj 308
“C:\dev\webrtc\trunk\talk\ninja”文件夹不存在,但我的“build.ninja”文件位于我的每个 C:\dev\webrtc\trunk\out(Debug | Debug_x64 | Release | Release_x64)。
你知道我做错了什么吗?
最佳答案
如果有人遇到此错误,您需要安装 DirectX SDK
关于visual-studio-2013 - 使用ninja构建WebRTC并在VS2013中调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23405112/