2013-01-09 64 views
3

A lot of errors here...做這些15馬赫蘋果Ø鏈接錯誤意味着

這:

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的。我如何正確設置。在模擬器上正常工作

+0

您使用的是哪個設備以及您使用的是哪個版本的xcode – Ranjit

+0

您是否正在使用其他項目? – amar

+0

xcode 4.5.2和iOs 6 –

回答

17

這可能與XCode沒有使用正確的C++標準庫有關。要解決這個問題,請點擊您的項目,轉到Build Settings下的項目目標,搜索名爲「C++標準庫」的設置。將其設置爲libstdC++或Compiler Default,不應將其設置爲libC++。

您需要這樣做,因爲Scandit SDK目前尚未運行最近引入XCode的新的C++ 11標準庫。在未來的版本中,將會使用C++ 11編譯器進行編譯,並使用現在在XCode中默認設置的std庫運行。

+0

太棒了...它一步就解決了所有的錯誤。 –

1

您沒有鏈接到C++標準庫。將你的代碼編譯爲C++(或者如果你需要的話可以使用Objective-C++),並且鏈接器將自動合併該庫。

+0

@ H2C03感謝您的快速回復,但我該怎麼做? –

3

我最近遇到了Scandit SDK的3.0.0-RC1版本。對我來說,問題來自於沒有鏈接到libC++。dylib庫。 (構建階段 - >與庫鏈接二進制文件)

+1

在庫中添加libC++。dylib減少了一些錯誤...相反,通過添加libstdC++。dylib刪除了所有錯誤。 –