现场情况如下:
我修改了./webrtc/modules/audio_coding/BUILD.gn进行编译" webrtc_opus"如下
rtc_static_library("webrtc_opus") {
sources = [
"codecs/opus/audio_decoder_opus.cc",
"codecs/opus/audio_decoder_opus.h",
"codecs/opus/audio_encoder_opus.cc",
"codecs/opus/audio_encoder_opus.h",
"codecs/opus/opus_inst.h",
"codecs/opus/opus_interface.c",
"codecs/opus/opus_interface.h",
]
deps = [
":audio_decoder_interface",
":audio_encoder_interface",
":audio_network_adaptor",
"../../base:rtc_base_approved",
]
if (rtc_build_opus) {
//opus.framework is located at /src/extern/opus/ in the WebRTC source project
include_dirs=["//extern/opus","//extern/opus/opus.framework/Headers"]
rpath_link="//extern/opus/"
ldflags = ["-Wl,-rpath=\$ORIGIN/${rpath_link}",
"-Wl,-rpath-link=${rpath_link}",
"-force_load"]
libs = ["opus.framework"]
}
}
我得到的错误如下:
ld: framework not found opus
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Traceback (most recent call last):
File "../../build/toolchain/mac/linker_driver.py", line 229, in <module>
Main(sys.argv)
File "../../build/toolchain/mac/linker_driver.py", line 79, in Main
subprocess.check_call(compiler_driver_args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['../../third_party/llvm-build/Release+Asserts/bin/clang++', '-shared', '-all_load', '-Xlinker', '-install_name', '-Xlinker', '@rpath/WebRTC.framework/WebRTC', '-Xlinker', '-objc_abi_version', '-Xlinker', '2', '-arch', 'arm64', '-Wl,-dead_strip', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk', '-stdlib=libc++', '-miphoneos-version-min=8.0', '-Wl,-ObjC', '-L../../extern/opus', '-o', 'obj/webrtc/sdk/arm64/WebRTC', '-Wl,-filelist,obj/webrtc/sdk/arm64/WebRTC.rsp', '-framework', 'AVFoundation', '-framework', 'AudioToolbox', '-framework', 'CoreGraphics', '-framework', 'CoreMedia', '-framework', 'GLKit', '-framework', 'VideoToolbox', '-framework', 'CoreFoundation', '-framework', 'CoreText', '-framework', 'Foundation', '-framework', 'CFNetwork', '-framework', 'Security', '-framework', 'SystemConfiguration', '-framework', 'UIKit', '-framework', 'CoreVideo', '-framework', 'OpenGLES', '-framework', 'QuartzCore', '-framework', 'opus']'
如果有人能把我拉出来,我们将非常感激。有一个解决方案,可以通过&#34; A&#34;重新使用opus.framework。和WebRTC?