美文网首页
记录Android 加载 webrtc libwebrtc.a

记录Android 加载 webrtc libwebrtc.a

作者: FM_1ad7 | 来源:发表于2023-09-24 08:59 被阅读0次

    下载webrtc参考网址: https://blog.csdn.net/yinshipin007/article/details/124696212

    1、切换到 webrtc_android/src 目录

    gn gen ../x86  --args='treat_warnings_as_errors=false target_os="android" target_cpu="x86" use_custom_libcxx=false  android_full_debug=true symbol_level=2 use_rtti=true rtc_include_tests=false '
    ninja -C ../x86
    

    2、出现问题
    ···
    Build with "use_custom_libcxx=false" args for gn will get error: ld.lld: error: undefined symbol: _Unwind_Backtrace
    修改代码:

    1. Change the src/buildtools/third_party/libunwind/BUILD.gn
    source_set("libunwind") {
      ...
    }
    

    add visibility

    source_set("libunwind") {
      visibility = ["//build/config:common_deps"]
      ...
    }
    
    1. Change the src/build/config/BUILD.gn
    if (use_custom_libcxx) {
      public_deps += [ "//buildtools/third_party/libc++" ]
    }
    

    to

    if (use_custom_libcxx) {
      public_deps += [ "//buildtools/third_party/libc++" ]
    } else {
      public_deps += [ "//buildtools/third_party/libunwind" ]
    }
    

    问题参考网址: https://bugs.chromium.org/p/webrtc/issues/detail?id=13535
    ···

    相关文章

      网友评论

          本文标题:记录Android 加载 webrtc libwebrtc.a

          本文链接:https://www.haomeiwen.com/subject/zdufbdtx.html