导入直播框架IJKMediaFramework.framework,报如下错误
Undefined symbols for architecture arm64:
"___gxx_personality_v0", referenced from:
std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<long long, void*>, std::__1::__tree_node<std::__1::__value_type<long long, void*>, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<long long, void*>, std::__1::__map_value_compare<long long, std::__1::__value_type<long long, void*>, std::__1::less<long long>, true>, std::__1::allocator<std::__1::__value_type<long long, void*> > >::__emplace_unique_key_args<long long, std::__1::piecewise_construct_t const&, std::__1::tuple<long long const&>, std::__1::tuple<> >(long long const&, std::__1::piecewise_construct_t const&&&, std::__1::tuple<long long const&>&&, std::__1::tuple<>&&) in IJKMediaFramework(ijkstl.o)
"operator delete(void*)", referenced from:
_ijk_map_destroy in IJKMediaFramework(ijkstl.o)
std::__1::__tree<std::__1::__value_type<long long, void*>, std::__1::__map_value_compare<long long, std::__1::__value_type<long long, void*>, std::__1::less<long long>, true>, std::__1::allocator<std::__1::__value_type<long long, void*> > >::destroy(std::__1::__tree_node<std::__1::__value_type<long long, void*>, void*>*) in IJKMediaFramework(ijkstl.o)
std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<long long, void*>, std::__1::__tree_node<std::__1::__value_type<long long, void*>, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<long long, void*>, std::__1::__map_value_compare<long long, std::__1::__value_type<long long, void*>, std::__1::less<long long>, true>, std::__1::allocator<std::__1::__value_type<long long, void*> > >::__emplace_unique_key_args<long long, std::__1::piecewise_construct_t const&, std::__1::tuple<long long const&>, std::__1::tuple<> >(long long const&, std::__1::piecewise_construct_t const&&&, std::__1::tuple<long long const&>&&, std::__1::tuple<>&&) in IJKMediaFramework(ijkstl.o)
std::__1::unique_ptr<std::__1::__tree_node<std::__1::__value_type<long long, void*>, void*>, std::__1::__tree_node_destructor<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<long long, void*>, void*> > > > std::__1::__tree<std::__1::__value_type<long long, void*>, std::__1::__map_value_compare<long long, std::__1::__value_type<long long, void*>, std::__1::less<long long>, true>, std::__1::allocator<std::__1::__value_type<long long, void*> > >::__construct_node<std::__1::piecewise_construct_t const&, std::__1::tuple<long long const&>, std::__1::tuple<> >(std::__1::piecewise_construct_t const&&&, std::__1::tuple<long long const&>&&, std::__1::tuple<>&&) in IJKMediaFramework(ijkstl.o)
std::__1::__tree<std::__1::__value_type<long long, void*>, std::__1::__map_value_compare<long long, std::__1::__value_type<long long, void*>, std::__1::less<long long>, true>, std::__1::allocator<std::__1::__value_type<long long, void*> > >::erase(std::__1::__tree_const_iterator<std::__1::__value_type<long long, void*>, std::__1::__tree_node<std::__1::__value_type<long long, void*>, void*>*, long>) in IJKMediaFramework(ijkstl.o)
"operator new(unsigned long)", referenced from:
_ijk_map_create in IJKMediaFramework(ijkstl.o)
std::__1::unique_ptr<std::__1::__tree_node<std::__1::__value_type<long long, void*>, void*>, std::__1::__tree_node_destructor<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<long long, void*>, void*> > > > std::__1::__tree<std::__1::__value_type<long long, void*>, std::__1::__map_value_compare<long long, std::__1::__value_type<long long, void*>, std::__1::less<long long>, true>, std::__1::allocator<std::__1::__value_type<long long, void*> > >::__construct_node<std::__1::piecewise_construct_t const&, std::__1::tuple<long long const&>, std::__1::tuple<> >(std::__1::piecewise_construct_t const&&&, std::__1::tuple<long long const&>&&, 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的说明可以看这篇文章。