目前我正在使用Swift on Xcode 6 beta 7为iPad(iOS7)构建WebRTC应用程序。我一直收到这些错误。我添加了错误的库吗?它无法找到它们吗?
以下是它正在打印的错误:
Undefined symbols for architecture armv7:
"std::string::_Rep::_S_empty_rep_storage", referenced from:
+[RTCMediaConstraints constraintsFromArray:] in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::_M_insert_aux(__gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > >, webrtc::MediaConstraintsInterface::Constraint const&) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
"std::string::assign(std::string const&)", referenced from:
std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::_M_insert_aux(__gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > >, webrtc::MediaConstraintsInterface::Constraint const&) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
webrtc::MediaConstraintsInterface::Constraint* std::__copy_backward<false, std::random_access_iterator_tag>::__copy_b<webrtc::MediaConstraintsInterface::Constraint*, webrtc::MediaConstraintsInterface::Constraint*>(webrtc::MediaConstraintsInterface::Constraint*, webrtc::MediaConstraintsInterface::Constraint*, webrtc::MediaConstraintsInterface::Constraint*) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
webrtc::MediaConstraintsInterface::Constraint* std::__copy<false, std::random_access_iterator_tag>::copy<webrtc::MediaConstraintsInterface::Constraint*, webrtc::MediaConstraintsInterface::Constraint*>(webrtc::MediaConstraintsInterface::Constraint*, webrtc::MediaConstraintsInterface::Constraint*, webrtc::MediaConstraintsInterface::Constraint*) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
webrtc::MediaConstraintsInterface::Constraint* std::__copy<false, std::random_access_iterator_tag>::copy<webrtc::MediaConstraintsInterface::Constraint const*, webrtc::MediaConstraintsInterface::Constraint*>(webrtc::MediaConstraintsInterface::Constraint const*, webrtc::MediaConstraintsInterface::Constraint const*, webrtc::MediaConstraintsInterface::Constraint*) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
"std::string::_Rep::_M_destroy(std::allocator<char> const&)", referenced from:
+[RTCMediaConstraints constraintsFromArray:] in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::_M_insert_aux(__gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > >, webrtc::MediaConstraintsInterface::Constraint const&) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)", referenced from:
__gnu_cxx::new_allocator<webrtc::MediaConstraintsInterface::Constraint>::construct(webrtc::MediaConstraintsInterface::Constraint*, webrtc::MediaConstraintsInterface::Constraint const&) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::_M_insert_aux(__gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > >, webrtc::MediaConstraintsInterface::Constraint const&) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
webrtc::MediaConstraintsInterface::Constraint::Constraint(std::string const&, std::string) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::operator=(std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > const&) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
webrtc::MediaConstraintsInterface::Constraint* std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::_M_allocate_and_copy<__gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint const*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > > >(unsigned long, __gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint const*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > >, __gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint const*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > >) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::vector(std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > const&) in libjingle_peerconnection_objc.a(RTCMediaConstraintsNative.o)
"std::__throw_length_error(char const*)", referenced from:
std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::_M_insert_aux(__gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > >, webrtc::MediaConstraintsInterface::Constraint const&) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()", referenced from:
__gnu_cxx::new_allocator<webrtc::MediaConstraintsInterface::Constraint>::construct(webrtc::MediaConstraintsInterface::Constraint*, webrtc::MediaConstraintsInterface::Constraint const&) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::_M_insert_aux(__gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > >, webrtc::MediaConstraintsInterface::Constraint const&) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
webrtc::MediaConstraintsInterface::Constraint::Constraint(std::string const&, std::string) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::~vector() in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::operator=(std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > const&) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
webrtc::MediaConstraintsInterface::Constraint* std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> >::_M_allocate_and_copy<__gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint const*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > > >(unsigned long, __gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint const*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > >, __gnu_cxx::__normal_iterator<webrtc::MediaConstraintsInterface::Constraint const*, std::vector<webrtc::MediaConstraintsInterface::Constraint, std::allocator<webrtc::MediaConstraintsInterface::Constraint> > >) in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)", referenced from:
+[RTCMediaConstraints constraintsFromArray:] in libjingle_peerconnection_objc.a(RTCMediaConstraints.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
任何帮助都很精彩。
答案 0 :(得分:6)
我知道这是旧的,但是......你需要在你的应用程序的Build Settings中将libstdc ++。dylib更改为libstdc ++。6.dylib在“Link Binary with Libraries”下。很讨厌,但它对我有用!