osx - WebRTC 链接问题

osx - WebRTC linkage issue

我正在尝试将 WebRTC 集成到一个 OSX 桌面应用程序中,但当我尝试 link 使用 webRTC 库时遇到了一些错误。问题是:

Undefined symbols for architecture x86_64:
  "_AVMediaTypeMuxed", referenced from:
  cricket::GetAVFoundationVideoDevices(std::vector<cricket::Device, std::allocator<cricket::Device> >*) in libWebRTC-arm64-debug.a(libjingle_media.macdevicemanagermm.o)

这告诉我我没有在我的 libjingle_media.a 中定义这个符号,根据它是正确的:

$ nm libjingle_media.a | grep _AVMediaTypeMuxed
warning: /Applications/Xcode64.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
             U _AVMediaTypeMuxed

我已经使用这个标志构建了 WebRTC:

GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=mac target_arch=x64"
GYP_GENERATORS="ninja"
GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_mac"

当然还有 ninja,运行 以前 gclient runhooks。知道这是怎么回事吗?

要解决此问题,您需要使用实现该功能的特定框架,在本例中为名为 AVFoundation

的框架