Windows使用Webrtc构建项目时仅支持Clang-Cl

发布于 2025-01-28 02:17:42 字数 487 浏览 4 评论 0原文

我正在尝试构建一个包含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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

攒一口袋星星 2025-02-04 02:17:43

事实证明,我必须使用-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 ...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文