Question

I'm getting an error in my build (using cordova 3.4):

Undefined symbols for architecture i386:
  "_iconv", referenced from:
      zxing::qrcode::DecodedBitStreamParser::append(std::string&, unsigned char const*, unsigned long, char const*) in zxing-all-in-one.o
  "_iconv_close", referenced from:
      zxing::qrcode::DecodedBitStreamParser::append(std::string&, unsigned char const*, unsigned long, char const*) in zxing-all-in-one.o
  "_iconv_open", referenced from:
      zxing::qrcode::DecodedBitStreamParser::append(std::string&, unsigned char const*, unsigned long, char const*) in zxing-all-in-one.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

I'm pretty sure this comes from the phone gap QR scanner plugin, but I don't think it should be building i386 at all. The qrcode scanner seems not to have a library of that architecture.

How can I tell cordova not to build i386? Or did i miss something?

Was it helpful?

Solution

When you build you can specify what type of build to do:

cordova compile --device

or for i386:

cordova compile --emulator

That's what fixed it for me.

OTHER TIPS

I've been struggling with this for a few days too. I followed the guidance in Snips answer here to get it working for me

libiconv not linking to iOS project

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top