Error message: Undefined characters for i386 architecture using ZBar libraries

I am having a problem right now with a project that I am trying to build in Xcode 4.0, hope someone can shed some light on this for me ..

I am trying to use the ZBar SDK and follow the instructions in the guide given here:

http://zbar.sourceforge.net/iphone/sdkdoc/camera.html

however, I get the same error. I checked John's post, however, the path he was talking about was not in my LIBRARY_SEARCH_PATH.

I am using Xcode 4.0 and trying to create my own project for iPad 4.3 simulator.

(The error I am getting):

Undefined symbols for architecture i386: "_objc_msgSend", referenced from: _main in main.o -[PrototypeAppDelegate application:didFinishLaunchingWithOptions:] in PrototypeAppDelegate.o -[PrototypeAppDelegate dealloc] in PrototypeAppDelegate.o -[Home loadGRView] in Home.o ... "_UIApplicationMain", referenced from: _main in main.o "_OBJC_CLASS_$_NSAutoreleasePool", referenced from: objc-class-ref in main.o "_objc_msgSendSuper2", referenced from: -[PrototypeAppDelegate dealloc] in PrototypeAppDelegate.o -[PrototypeAppDelegate_iPhone dealloc] in PrototypeAppDelegate_iPhone.o ... "_objc_setProperty", referenced from: -[PrototypeAppDelegate setTabBarController:] in PrototypeAppDelegate.o -[PrototypeAppDelegate setTheNavController:] in PrototypeAppDelegate.o ... 

etc..

I tried to look at the ReaderSample code included with ZBar sdk and thought that the problem was that I was missing a couple of frameworks that they used in their application, but including these frameworks only increased the number of errors getting. Is this a problem with build customization? Anyone have any ideas on what I can try?

PS: I found two topics similar to this problem, and tried various solutions that they recommended, and still could not get a solution

-http: //stackoverflow.com/questions/1452466/suddenly-i-am-not-able-to-build-for-the-iphone-simulator -http: //stackoverflow.com/questions/1456185/build-error -missing-required-architecture-i386-in-file / 1467238 # 1467238

Hope I'm using this thread correctly ... I'm relatively new to stack overflow. T

+7
source share
2 answers

I managed to play and make it work.

I upgraded Xcode to 4.0.2. In addition, the documentation for ZBar forgot to mention other structures needed to use the SDK (see ReaderSample app). These 7 frames should be in the following order:

 Foundation.framework CoreGraphics.framework UIKit.framework AVFoundation.framework CoreMedia.framework CoreVideo.framework QuartzCore.framework libiconv.dylib libzbar.a 

I did not know what order was announced in the construction phases. In any case, I hope someone tries to integrate the barcode scanner into their application, this answer will be useful.

+14
source

I had a similar problem while writing an application that used CoreData. It turns out that the "Phase Assembly" section did not include the critical class.m file. I manually added it to the list (although it was already in the project), and everything worked fine. I have never seen Xcode ignore a project file like this before.

+1
source

All Articles