0
votes

I am working on a barcode reader app in iPhone. I am using the Zbar barcode reader app available on the web. I have tried sample code and it is working perfactly. It is scanning barcodes. Now I want to fetch the code and pass it as unique Id in my SQLite database. The problem is when I try to add libraries of both SQLite and barcode. It is giving me errors like:

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

I am getting 28 same type of errors.. I have searched on the web. But no one has used bar codes with SQLite. They have used other databases. Can I use an SQLite database to store barcode fetched data? How do I fix these errors?

1
Make sure both libraries are added to the framesworks list in the project. - Rayfleck
You need to provide the more detailed linker errors in order to get an idea of what it's complaining about. - smparkes
@Rayfleck -See I am using libsqlite3.dylib for SQLite and for barcode reading I am using AVFoundation , QuartzCore,CoreMedia,CoreGraphics,libliconv.2.dylib......So is it possible having clashes among them? - Khushbu Shah
You'll want to put the error in the main question or on pastie.org or gist.github.com. Not good in comments. - smparkes
oh k...I will do.Thanks smparkes - Khushbu Shah

1 Answers

0
votes

This links may be useful to you.

Please check them out.

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

2] Try adding QuartzCore.framework to your app if you have not added it

3] Also make sure you have added all the libraries that you need to.

Please cross check it as this is generally an error that comes up when some framework or library is missing.

Hope this helps you.