错误信息:
Pods/TXLiteAVSDK_Professional/TXLiteAVSDK_Professional/TXLiteAVSDK_Professional.framework/TXLiteAVSDK_Professional(dict.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决方法:
在项目的target的 Build Setting 里面,搜素bitcode,把 Enable Bitcode设置成NO。
错误信息片段如下:
Showing Recent Messages
Undefined symbol: std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(long)
Undefined symbol: std::__1::locale::locale(std::__1::locale const&)
Undefined symbol: std::__1::future_category()
Undefined symbol: std::__1::future_error::future_error(std::__1::error_code)
Undefined symbol: vtable for std::__1::__assoc_sub_state
Undefined symbol: std::nothrow
Undefined symbol: std::__1::__vector_base_common<true>::__throw_out_of_range() const
Undefined symbol: std::exception_ptr::~exception_ptr()
Undefined symbol: std::__1::promise<void>::~promise()
Undefined symbol: std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(unsigned long)
Undefined symbol: std::__1::promise<void>::promise()
Undefined symbol: std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(bool)
Undefined symbol: std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(void const*)
Undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char, unsigned long) const
Undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::replace(unsigned long, unsigned long, char const*, unsigned long)
Undefined symbol: std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >)
Undefined symbol: std::__1::condition_variable::notify_all()
Undefined symbol: std::__1::condition_variable::~condition_variable()
Undefined symbol: std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(long long)
Undefined symbol: std::__1::recursive_mutex::unlock()
Undefined symbol: std::__1::recursive_mutex::try_lock()
Undefined symbol: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::~basic_streambuf()
Undefined symbol: std::__1::recursive_mutex::~recursive_mutex()
Undefined symbol: std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(double)
Undefined symbol: std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()
Undefined symbol: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::basic_streambuf()
Undefined symbol: std::__1::recursive_mutex::recursive_mutex()
Undefined symbol: operator new[](unsigned long)
Undefined symbol: std::__1::ios_base::clear(unsigned int)
Undefined symbol: std::__1::recursive_mutex::lock()
Undefined symbol: std::__1::chrono::steady_clock::now()
Undefined symbol: std::__1::__thread_struct::~__thread_struct()
Undefined symbol: std::__1::thread::detach()
Undefined symbol: std::__1::chrono::system_clock::now()
Undefined symbol: virtual thunk to std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()
Undefined symbol: std::__1::__next_prime(unsigned long)
Undefined symbol: operator delete[](void*)
Undefined symbol: std::__1::ios_base::getloc() const
Undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::erase(unsigned long, unsigned long)
Undefined symbol: _vImageRotate90_Planar8
Undefined symbol: std::__1::to_string(int)
Undefined symbol: std::__1::locale::~locale()
Undefined symbol: std::__1::thread::~thread()
Undefined symbol: std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(unsigned int)
Undefined symbol: std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()
Undefined symbol: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::imbue(std::__1::locale const&)
Undefined symbol: std::__1::mutex::lock()
解决方案:
引入如下库:
libz.tbd
libc++.tbd
libresolv.tbd
libsqlite3.tbd
Accelerate.framework
OpenAL.framework
引入步骤:
No such module 'TXLiteAVSDK_TRTC'(Swift报错信息)
检查一下search patch 相关的设置,看看路径是否
设置Framework 路径如下:
另外Header等的路径也确保没有出现错误。
Swift引用OC代码,需要创建bridge文件,把OC文件引入
OC引用Swift代码,需要在OC文件中引入 '项目名-Swift.h',同时把Swift类设置成public,方法和属性前面添加@Objc
错误信息:
duplicate symbol xxx
把 other linker flags 需要设置成-Objc
-Objc:加载OC代码
-all_load,-force_load 加载全部代码
错误信息
Undefined symbols for architecture arm64:
"_RPVideoSampleOrientationKey", referenced from:
-[TXCReplayKitExtVideoEncoder rotationOfSampleBuffer:imageWidth:imageHeight:] in TXLiteAVSDK_ReplayKitExt(TXCReplayKitExtVideoEncoder.o)
"_OBJC_CLASS_$_RPScreenRecorder", referenced from:
objc-class-ref in TXLiteAVSDK_Professional(TXCCaptureAndEnc.o)
objc-class-ref in TXLiteAVSDK_TRTC(TXCCaptureAndEnc.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决方案:
引入 ReplayKit.framework。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。