提问人:hw.Jeon 提问时间:4/24/2021 更新时间:11/18/2023 访问量:1387
如何为 ios 构建 webRTC 框架
How to build webRTC Framework for ios
问:
我想构建 WebRTC 框架。但我有一些问题。
谷歌提供了这方面的指南。https://webrtc.github.io/webrtc-org/native-code/ios/
这是我的代码
# debug build for simulator
gn gen out/ios_sim --args='target_os="ios" target_cpu="x64"'
但它失败了,并给出了以下评论。
ERROR at //webrtc.gni:486:32: Assignment had no effect.
xctest_module_target = "//base/test:google_test_runner"
^-------------------------------
You set the variable "xctest_module_target" here and it was unused before it went
out of scope.
See //testing/test.gni:451:5: whence it was called.
target(ios_test_target_type, _test_target) {
^-------------------------------------------
See //webrtc.gni:443:3: whence it was called.
test(target_name) {
^------------------
See //BUILD.gn:536:3: whence it was called.
rtc_test("rtc_unittests") {
^--------------------------
我找不到有关此错误的任何信息。 谁能帮我解决这个问题?
答:
8赞
Garth
10/28/2021
#1
回复较晚,但对于那些仍在为这个问题而苦苦挣扎的人 - 我遇到了同样的问题,并通过使用“rtc_include_tests=false”构建来解决,即:
gn gen out/ios_sim --args='target_os="ios" target_cpu="x64" rtc_include_tests=false'
0赞
Kirill Pukhov
11/18/2023
#2
Garth 答案解决了这个问题,但据我了解,它删除了测试。我找到了解决此问题的解决方案,而没有这种副作用。您需要将标志添加到参数中。enable_run_ios_unittests_with_xctest=true
gn gen out/ios --args='target_os="ios" target_cpu="arm64" enable_run_ios_unittests_with_xctest=true'
评论