ZXingphonegap 插件的 XCode 构建错误:未定义架构 i386 的符号

发布于 2024-12-10 07:15:47 字数 1051 浏览 0 评论 0原文

我正在尝试将 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. 在“zxing/iphone/ZXingWidget/”下找到“ZXingWidget.xcodeproj”文件。拖动 ZXingWidget.xcodeproj 并将其放下 到 Xcode 项目的“组和文件”侧边栏的根目录。一个 将出现对话框 - 确保“复制项目”未选中,并且 单击“添加”之前,“参考类型”为“相对于项目”。 或者,您可以右键单击项目导航器并选择 '将文件添加到“MyProject”'

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

xcode add .xcodeprojectdialog

任何关于我出错的地方的建议表示赞赏。我对 xcode 有点不熟悉(许多 PhoneGap 开发人员也是如此)

I am trying to use the BarcodeScanner plugin (from ) with PhoneGap. I have carefully followed the steps in the readme (including those in the ZXing readme) but I still get this error:

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)

The only part of the instructions that haven't gone entirely to plan was this:

  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"'

However, when I drag the .xcodeproj onto my Project I don't get a dialog - it just appears as a 'nested' project. If I go the other route and click 'Add files to "MyProject" the dialog doesn't provide an option for "Relative to Project":

xcode add .xcodeproject dialog

Any suggestions as to where I'm going wrong appreciated. I am somewhat unfamiliar with xcode (as are many PhoneGap developers)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一梦浮鱼 2024-12-17 07:15:47

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

The step from the zxing iphone README that apparently didn't work is Step 2. That's the part that tells Xcode to link your app against the zxing widget library and that's what the linker isn't finding. Try double checking that.

青衫负雪 2024-12-17 07:15:47

自述文件的链接位于此处。请遵循并仔细检查这些步骤。我遵循并成功地与我的代码集成。

The link for ReadMe is here. Please follow and double check the steps. I followed and successfully integrated with my code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文