ios - ZXing phonegap 插件的 XCode 构建错误 : Undefind symbols for architecture i386

标签 ios xcode cordova zxing

我正在尝试将 BarcodeScanner 插件(来自 )与 PhoneGap 一起使用。我已仔细按照自述文件中的步骤(包括 ZXing 自述文件中的步骤)进行操作,但仍然出现此错误:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_ZXingWidgetController", referenced from:
      objc-class-ref in BarcodeScanner.o
  "_OBJC_CLASS_$_QRCodeReader", referenced from:
      objc-class-ref in BarcodeScanner.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

说明中唯一没有完全按计划进行的部分是:

  1. Locate the "ZXingWidget.xcodeproj" file under "zxing/iphone/ZXingWidget/". Drag ZXingWidget.xcodeproj and drop it onto the root of your Xcode project's "Groups and Files" sidebar. A dialog will appear -- make sure "Copy items" is unchecked and "Reference Type" is "Relative to Project" before clicking "Add". Alternatively you can right-click on you project navigator and select 'Add files to "MyProject"'

但是,当我将 .xcodeproj 拖到我的项目中时,我没有看到对话框 - 它只是显示为“嵌套”项目。如果我走另一条路并单击“将文件添加到“我的项目”,该对话框不会提供“相对于项目”的选项:

xcode add .xcodeproject dialog

如有任何关于我哪里出错的建议,我将不胜感激。我对 xcode 不太熟悉(许多 PhoneGap 开发人员也是如此)

最佳答案

zxing iphone 自述文件中显然不起作用的步骤是第 2 步。这是告诉 Xcode 将您的应用程序链接到 zxing 小部件库的部分,而这正是链接器找不到的部分。尝试仔细检查一下。

关于ios - ZXing phonegap 插件的 XCode 构建错误 : Undefind symbols for architecture i386,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7782011/

相关文章:

ios - 适用于 iPhone 的 Tiled 和 Cocos2D : How do you animate tiles?

iphone - Three20 应用商店拒绝 (UITouch) - 删除了违规代码,发布版本但以二进制形式存在

swift - 随机化字典中的值并在标签中显示它们 SWIFT

c# - Ajax 请求在 HandleUnauthorizedRequest 之前命中错误函数

cordova - 内容安全策略错误 https ://ssl. gstatic.com

android - 如果服务器在 VMware 上运行,Meteor Cordova Android 应用程序无法连接到服务器

带有 UIImage 的 IOS CollectionView 从 url 加载

ios - 将首次启动检测添加到*现有* iOS 应用程序

ios - 快速从 UIImage 中找到独特的颜色?

iphone - 是系统框架(如UIKIt.framework,CoreGraphics.framework)静态库还是动态库