Windows使用Webrtc构建项目时仅支持Clang-Cl
我正在尝试构建一个包含WebRTC的项目。但是,由于此错误而失败的汇编: 供应商\ webrtc \ src \ base/compiler_specific.h(11,1):致命错误c1189:#error:“仅在Windows上支持Clang-Cl,请参见https://crbug.com/9888071"Eth/代码>。我尝试定义
__ clang __
预处理程序定义,但这只是导致错误:stl1000:意外的编译器版本,预期的clang 11或更新。
我正在使用CMAKE与Visual Studio 2019 Generator一起使用。我已经独立和作为Visual Studio构建工具的一部分安装了Clang-Cl,并且尝试覆盖通往Clang-Cl可执行文件的路径。我知道这是当我编译WebRTC服务器时,仅在Windows上支持Clang-Cl,但是在该问题上没有结论性的答案。我想念明显的东西吗?提前致谢
I am trying to build a project that contains webrtc. However compilation fails with this error :vendor\webrtc\src\base/compiler_specific.h(11,1): fatal error C1189: #error: "Only clang-cl is supported on Windows, see https://crbug.com/988071"
. I have tried defining __clang__
preprocessor definition, but this simply causes an error :STL1000: Unexpected compiler version, expected Clang 11 or newer.
I am using cmake with Visual Studio 2019 generator. I have installed clang-cl , both independently and as part as Visual Studio Build Tools and I have tried overwriting the path to the clang-cl executable. I am aware this is a duplicate of Only clang-cl is supported on Windows, when I compile my webrtc server, but there was no conclusive answer on that issue. Am i missing something obvious? Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,我必须使用-t选项指定Cmake中的工具集:
cmake -g“ Visual Studio 2019” -T Clangcl ...
It turns out I have to specify the toolset in CMake with the -T option :
cmake -G "Visual Studio 2019" -T ClangCl ...