0

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?

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
Khushbu Shah
  • 282
  • 4
  • 12
  • Make sure both libraries are added to the framesworks list in the project. – Rayfleck Feb 08 '12 at 16:02
  • You need to provide the more detailed linker errors in order to get an idea of what it's complaining about. – smparkes Feb 08 '12 at 16:07
  • @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 Feb 09 '12 at 04:38
  • You'll want to put the error in the main question or on pastie.org or gist.github.com. Not good in comments. – smparkes Feb 09 '12 at 04:41
  • oh k...I will do.Thanks smparkes – Khushbu Shah Feb 09 '12 at 04:46
  • I have searched a lot for using sqlite database for bardode storage...But I could found in "coredata" database only..Can any one having barcode with sqlite database? – Khushbu Shah Feb 09 '12 at 05:07
  • i think prbolem in your sqlite Implement, if you have no problem then paste your code – Deepesh Feb 09 '12 at 05:58
  • Thanks to all but the problem was with library. I was using reference app which was built for ios4 and in ios5 i had to add one more library for that and it's working – Khushbu Shah Feb 09 '12 at 09:15

1 Answers1

0

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.

Community
  • 1
  • 1
Parth Bhatt
  • 19,381
  • 28
  • 133
  • 216