3

目前,我正在 Xcode 6 beta 7 上使用 Swift 为 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)

任何帮助都很棒。

4

1 回答 1

6

我知道这是较旧的,但是...您需要在应用程序的构建设置中的“将二进制文件与库链接”下将 libstdc++.dylib 更改为 libstdc++.6.dylib。烦人,但它对我有用!

于 2014-09-25T02:13:52.190 回答