Apache Cordova - don't build i386 architecture

瘦欲@ 提交于 2019-12-10 21:06:57

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/22948917/apache-cordova-dont-build-i386-architecture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!