【问题标题】:Apache Cordova - don't build i386 architectureApache Cordova - 不要构建 i386 架构
【发布时间】:2014-04-08 21:51:54
【问题描述】:

我在构建中遇到错误(使用 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 **

我很确定这来自手机间隙 QR 扫描仪插件,但我认为它根本不应该构建 i386。二维码扫描器似乎没有该架构的库。

如何告诉科尔多瓦不要构建 i386?还是我错过了什么?

【问题讨论】:

  • 你添加了所有需要的框架吗

标签: ios objective-c xcode cordova cordova-3


【解决方案1】:

在构建时,您可以指定要执行的构建类型:

cordova compile --device

或者对于 i386:

cordova compile --emulator

这就是为我解决的问题。

【讨论】:

  • 不确定它是如何为您解决的。现代 Mac 是 x86_64,我(和其他人一样)在没有 i386 切片的情况下构建我的库。 --device 确实像你说的那样工作。
  • 我认为这与我们配置的模拟器有关。自从使用更高版本的科尔多瓦后,我就没有遇到过这个问题
【解决方案2】:

我也为此苦苦挣扎了几天。我按照 Snips answer here 中的指导让它为我工作

libiconv not linking to iOS project

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-23
    • 1970-01-01
    • 1970-01-01
    • 2016-04-16
    • 2012-02-09
    相关资源
    最近更新 更多