这15个苹果连接器错误意味着什么

时间:2013-01-09 14:14:34

标签: ios linker-errors

A lot of errors here...

而且:

Ld /Users/davidraijmakers/Library/Developer/Xcode/DerivedData/Scanner-bbwbbvayxxnrhwdsgbkvibplofyw/Build/Products/Debug-iphoneos/Scanner.app/Scanner normal armv7
    cd /Users/davidraijmakers/Documents/xcodezooi/Scanner
    setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/davidraijmakers/Library/Developer/Xcode/DerivedData/Scanner-bbwbbvayxxnrhwdsgbkvibplofyw/Build/Products/Debug-iphoneos -L/Users/davidraijmakers/Documents/xcodezooi/Scanner/Scanner/ScanditSDK -F/Users/davidraijmakers/Library/Developer/Xcode/DerivedData/Scanner-bbwbbvayxxnrhwdsgbkvibplofyw/Build/Products/Debug-iphoneos -filelist /Users/davidraijmakers/Library/Developer/Xcode/DerivedData/Scanner-bbwbbvayxxnrhwdsgbkvibplofyw/Build/Intermediates/Scanner.build/Debug-iphoneos/Scanner.build/Objects-normal/armv7/Scanner.LinkFileList -dead_strip -fobjc-link-runtime -stdlib=libc++ -miphoneos-version-min=6.0 -liconv -lz -framework CoreVideo -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework QuartzCore -framework SystemConfiguration -framework UIKit -framework Foundation -framework CoreGraphics -lscanditsdk-iphone-2.2.5 -o /Users/davidraijmakers/Library/Developer/Xcode/DerivedData/Scanner-bbwbbvayxxnrhwdsgbkvibplofyw/Build/Products/Debug-iphoneos/Scanner.app/Scanner

Undefined symbols for architecture armv7:
  "std::basic_ostream<char, std::char_traits<char> >& std::operator<<<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)", referenced from:
      l1348 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1486 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1585 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1600 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1602 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1655 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
  "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)", referenced from:
      l1241 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
  "std::ios_base::Init::Init()", referenced from:
      l1670 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1671 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1672 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1673 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1674 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1675 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1676 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      ...
  "std::__throw_length_error(char const*)", referenced from:
      std::vector<zxing::Ref<zxing::datamatrix::Version>, std::allocator<zxing::Ref<zxing::datamatrix::Version> > >::_M_insert_aux(__gnu_cxx::__normal_iterator<zxing::Ref<zxing::datamatrix::Version>*, std::vector<zxing::Ref<zxing::datamatrix::Version>, std::allocator<zxing::Ref<zxing::datamatrix::Version> > > >, zxing::Ref<zxing::datamatrix::Version> const&) in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      std::vector<zxing::datamatrix::ECB*, std::allocator<zxing::datamatrix::ECB*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<zxing::datamatrix::ECB**, std::vector<zxing::datamatrix::ECB*, std::allocator<zxing::datamatrix::ECB*> > >, zxing::datamatrix::ECB* const&) in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      std::vector<zxing::Ref<zxing::qrcode::QRCodeVersion>, std::allocator<zxing::Ref<zxing::qrcode::QRCodeVersion> > >::_M_insert_aux(__gnu_cxx::__normal_iterator<zxing::Ref<zxing::qrcode::QRCodeVersion>*, std::vector<zxing::Ref<zxing::qrcode::QRCodeVersion>, std::allocator<zxing::Ref<zxing::qrcode::QRCodeVersion> > > >, zxing::Ref<zxing::qrcode::QRCodeVersion> const&) in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      std::vector<zxing::qrcode::ECB*, std::allocator<zxing::qrcode::ECB*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<zxing::qrcode::ECB**, std::vector<zxing::qrcode::ECB*, std::allocator<zxing::qrcode::ECB*> > >, zxing::qrcode::ECB* const&) in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      std::vector<zxing::Ref<zxing::qrcode::DataMask>, std::allocator<zxing::Ref<zxing::qrcode::DataMask> > >::_M_insert_aux(__gnu_cxx::__normal_iterator<zxing::Ref<zxing::qrcode::DataMask>*, std::vector<zxing::Ref<zxing::qrcode::DataMask>, std::allocator<zxing::Ref<zxing::qrcode::DataMask> > > >, zxing::Ref<zxing::qrcode::DataMask> const&) in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      std::vector<zxing::qrcode::AlignmentPattern*, std::allocator<zxing::qrcode::AlignmentPattern*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<zxing::qrcode::AlignmentPattern**, std::vector<zxing::qrcode::AlignmentPattern*, std::allocator<zxing::qrcode::AlignmentPattern*> > >, zxing::qrcode::AlignmentPattern* const&) in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      std::vector<zxing::Ref<zxing::qrcode::FinderPattern>, std::allocator<zxing::Ref<zxing::qrcode::FinderPattern> > >::_M_insert_aux(__gnu_cxx::__normal_iterator<zxing::Ref<zxing::qrcode::FinderPattern>*, std::vector<zxing::Ref<zxing::qrcode::FinderPattern>, std::allocator<zxing::Ref<zxing::qrcode::FinderPattern> > > >, zxing::Ref<zxing::qrcode::FinderPattern> const&) in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      ...
  "std::string::append(char const*, unsigned long)", referenced from:
      l1598 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
  "std::string::_Rep::_S_empty_rep_storage", referenced from:
      l1604 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
  "std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)", referenced from:
      l1481 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1482 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1483 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1484 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1485 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
  "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()", referenced from:
      l1243 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1244 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1245 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1348 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1477 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1585 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1600 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      ...
  "std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)", referenced from:
      l1348 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1480 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1585 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1600 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1602 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1655 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
  "std::ios_base::Init::~Init()", referenced from:
      l1670 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1671 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1672 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1673 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1674 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1675 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1676 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      ...
  "std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const", referenced from:
      l1348 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1480 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1585 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1600 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1602 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1655 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
  "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)", referenced from:
      l1378 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      zxing::Exception::Exception(zxing::Exception const&) in libscanditsdk-iphone-2.2.5.a(mirasense.o)
  "std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()", referenced from:
      l1348 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1480 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1585 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1600 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1602 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1655 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
  "std::ostream::operator<<(int)", referenced from:
      l1348 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1481 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1482 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1483 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1585 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1600 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      l1602 in libscanditsdk-iphone-2.2.5.a(mirasense.o)
      ...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

也许是armv7的东西。我该如何正确设置。在模拟器上正常工作

3 个答案:

答案 0 :(得分:17)

这可能与XCode没有使用正确的C ++标准库有关。要解决此问题,请单击您的项目,转到Build Settings下的项目目标,搜索名为“C ++ Standard Library”的设置。将其设置为libstdc ++或Compiler Default,不应将其设置为libc ++。

您需要执行此操作,因为Scandit SDK当前尚未使用最近引入XCode的新C ++ 11标准库运行。在未来的版本中,将使用C ++ 11编译器编译并使用现在在XCode中设置为默认值的std库运行。

答案 1 :(得分:3)

我最近使用Scandit SDK的3.0.0-RC1版本遇到了这个问题。对我来说,问题来自于没有链接到libc ++。dylib库。 (构建阶段 - &gt;链接二进制文件与库)

答案 2 :(得分:1)

您没有链接到C ++标准库。将代码编译为C ++(如果需要,编译为Objective-C ++),链接器将自动合并该库。