【问题标题】:Build errors when using ZBarReader controller with SQLite将 ZBarReader 控制器与 SQLite 一起使用时生成错误
【发布时间】:2012-02-08 14:02:26
【问题描述】:

我正在 iPhone 上开发条形码阅读器应用程序。我正在使用网络上提供的 Zbar 条码阅读器应用程序。我已经尝试过示例代码,它工作正常。它正在扫描条形码。 现在我想获取代码并将其作为唯一 ID 传递到我的 SQLite 数据库中。 问题是当我尝试添加 SQLite 和条形码库时。它给了我这样的错误:

Undefined symbols for architecture i386:
  "_objc_autoreleasePoolPush", referenced from:
      _main in main.o
  "_objc_msgSend", referenced from:
      _main in main.o
      -[AppDelegate dealloc] in AppDelegate.o
      -[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
      -[AppDelegate createEditableCopyOfDatabaseIfNeeded] in AppDelegate.o
      -[AppDelegate applicationDocumentsDirectory] in AppDelegate.o
      -[ViewController databaseOpen] in ViewController.o
      -[ViewController SaveData:] in ViewController.o
      ...
  "_NSStringFromClass", referenced from:
      _main in main.o
  "_objc_autoreleasePoolPop", referenced from:
      _main in main.o

我收到 28 个相同类型的错误.. 我在网上搜索过。但是没有人在 SQLite 中使用过条形码。他们使用了其他数据库。我可以使用 SQLite 数据库来存储条码获取的数据吗?如何修复这些错误?

【问题讨论】:

  • 确保将两个库都添加到项目的框架列表中。
  • 您需要提供更详细的链接器错误,以便了解它在抱怨什么。
  • @Rayfleck - 请参阅我正在使用 libsqlite3.dylib 进行 SQLite 和条形码读取我正在使用 AVFoundation、QuartzCore、CoreMedia、CoreGraphics、libliconv.2.dylib ......所以有可能他们之间有冲突吗?
  • 您需要将错误放在主要问题或 paste.org 或 gist.github.com 上。在 cmets 中不好。
  • 哦,我会的。谢谢 smparkes

标签: iphone objective-c sqlite linker barcode


【解决方案1】:

此链接可能对您有用。

请检查一下。

1]Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error

2] 如果您尚未添加 QuartzCore.framework,请尝试将其添加到您的应用中

3] 还要确保您已添加所有需要的库

请交叉检查,因为这通常是缺少某些框架或库时出现的错误。

希望对你有所帮助。

【讨论】:

  • 现已售出...谢谢帮助
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-10-27
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多