Zxing iOS7 deployment target - lib won't build

827 views
Skip to first unread message

Alexander Mack

unread,
Oct 2, 2013, 4:01:30 AM10/2/13
to zx...@googlegroups.com
Hello,
I've tried to include the latest zxing library in my recent project.

This project is for iOS7 only, so my deployment target is iOS7.

I've added zxing like in any other project before and checked everything. Zxing won't compile (see errors below).

As soon as I change the Deployment Target to iOS5.1 for example, zxing compiles fine! I've already set the Build active Architectures only to NO and checked the deployment target within the zxing project - still 4.3 like in another project where I am using zxing.

All Compiler settings seem to be right as well (Compiler Default)

I would appreciate any help - thanks in advance!

Undefined symbols for architecture i386:

  "std::string::size() const", referenced from:

      zxing::String::size() const in libZXingWidget.a(Str.o)

      zxing::String::length() const in libZXingWidget.a(Str.o)

  "std::string::c_str() const", referenced from:

      zxing::qrcode::Detector::computeDimension(zxing::Ref<zxing::ResultPoint>, zxing::Ref<zxing::ResultPoint>, zxing::Ref<zxing::ResultPoint>, float) in libZXingWidget.a(Detector-B8B28E953F840D47.o)

      zxing::GridSampler::checkAndNudgePoints(zxing::Ref<zxing::BitMatrix>, std::vector<float, std::allocator<float> >&) in libZXingWidget.a(GridSampler.o)

      zxing::qrcode::DecodedBitStreamParser::append(std::string&, std::string const&, char const*) in libZXingWidget.a(DecodedBitStreamParser-64E27B33E79CBC52.o)

      zxing::qrcode::DecodedBitStreamParser::decodeByteSegment(zxing::Ref<zxing::BitSource>, std::string&, int, zxing::common::CharacterSetECI*, zxing::ArrayRef<zxing::ArrayRef<char> >&, std::map<unsigned int, std::string, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::string> > > const&) in libZXingWidget.a(DecodedBitStreamParser-64E27B33E79CBC52.o)

      zxing::qrcode::DecodedBitStreamParser::decodeNumericSegment(zxing::Ref<zxing::BitSource>, std::string&, int) in libZXingWidget.a(DecodedBitStreamParser-64E27B33E79CBC52.o)

      zxing::qrcode::Mode::forBits(int) in libZXingWidget.a(Mode.o)

      zxing::BitSource::readBits(int) in libZXingWidget.a(BitSource.o)

      ...

  "std::string::length() const", referenced from:

      zxing::oned::UPCEANReader::decodeRow(int, zxing::Ref<zxing::BitArray>, zxing::oned::OneDReader::Range const&) in libZXingWidget.a(UPCEANReader.o)

      zxing::oned::UPCEANReader::checkStandardUPCEANChecksum(zxing::Ref<zxing::String> const&) in libZXingWidget.a(UPCEANReader.o)

      zxing::qrcode::DecodedBitStreamParser::append(std::string&, std::string const&, char const*) in libZXingWidget.a(DecodedBitStreamParser-64E27B33E79CBC52.o)

      zxing::qrcode::DecodedBitStreamParser::decodeAlphanumericSegment(zxing::Ref<zxing::BitSource>, std::string&, int, bool) in libZXingWidget.a(DecodedBitStreamParser-64E27B33E79CBC52.o)

  "std::string::substr(unsigned long, unsigned long) const", referenced from:

......... 

Alexander Mack

unread,
Oct 2, 2013, 4:58:02 AM10/2/13
to zx...@googlegroups.com
Okay, I got it working!

On deployment target iOS7 there seems to be the need to set the compilers to C++ 11 (sdt) as well as libc++ (LLVM)

After switching those settings the build runs successfully
Reply all
Reply to author
Forward
0 new messages