导入直播框架IJKMediaFramework.framework,报如下错误
Undefined symbols for architecture arm64:
"___gxx_personality_v0", referenced from:
std::__1::pair, std::__1::__tree_node, void*>*, long>, bool> std::__1::__tree, std::__1::__map_value_compare, std::__1::less, true>, std::__1::allocator > >::__emplace_unique_key_args, std::__1::tuple<> >(long long const&, std::__1::piecewise_construct_t const&&&, std::__1::tuple&&, std::__1::tuple<>&&) in IJKMediaFramework(ijkstl.o)
"operator delete(void*)", referenced from:
_ijk_map_destroy in IJKMediaFramework(ijkstl.o)
std::__1::__tree, std::__1::__map_value_compare, std::__1::less, true>, std::__1::allocator > >::destroy(std::__1::__tree_node, void*>*) in IJKMediaFramework(ijkstl.o)
std::__1::pair, std::__1::__tree_node, void*>*, long>, bool> std::__1::__tree, std::__1::__map_value_compare, std::__1::less, true>, std::__1::allocator > >::__emplace_unique_key_args, std::__1::tuple<> >(long long const&, std::__1::piecewise_construct_t const&&&, std::__1::tuple&&, std::__1::tuple<>&&) in IJKMediaFramework(ijkstl.o)
std::__1::unique_ptr, void*>, std::__1::__tree_node_destructor, void*> > > > std::__1::__tree, std::__1::__map_value_compare, std::__1::less, true>, std::__1::allocator > >::__construct_node, std::__1::tuple<> >(std::__1::piecewise_construct_t const&&&, std::__1::tuple&&, std::__1::tuple<>&&) in IJKMediaFramework(ijkstl.o)
std::__1::__tree, std::__1::__map_value_compare, std::__1::less, true>, std::__1::allocator > >::erase(std::__1::__tree_const_iterator, std::__1::__tree_node, void*>*, long>) in IJKMediaFramework(ijkstl.o)
"operator new(unsigned long)", referenced from:
_ijk_map_create in IJKMediaFramework(ijkstl.o)
std::__1::unique_ptr, void*>, std::__1::__tree_node_destructor, void*> > > > std::__1::__tree, std::__1::__map_value_compare, std::__1::less, true>, std::__1::allocator > >::__construct_node, std::__1::tuple<> >(std::__1::piecewise_construct_t const&&&, std::__1::tuple&&, std::__1::tuple<>&&) in IJKMediaFramework(ijkstl.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决方法:添加依赖库libc++.tbd
然后就可以在项目中导入直播框架IJKMediaFramework.framework,使用该框架播放视频啦
关于libstdc++.dylib和libc++.dylib的说明可以看这篇文章。