Menu

Compiler errors - help plz (;^(

2010-05-27
2013-02-02
  • David Gretlein

    David Gretlein - 2010-05-27

    Greetings -

    I am new to the iPhone development word (come from embedded C, C++ and enterprise business app development worlds), and yes, the "other" development tools.

    I have downloaded and built the application in XCode (3.1.3), the readertest app.  However, when trying to create a new project incorporating the zbar project, etc … I earn errors I am unfamiliar with and how to mitigate them.  Any assistance would greatly be appreciated.

    The Warning is "The Copy Bundle Resources build phase contains this target's Info.plist file "MyZBARApp-Info.plist"".
    The Error is duplicate symbol _OBJC_IVAR_$_MyZBARAppAppDelegate.view.Controller in  …… extremely long path here

    Much appreciated … I am presenting a proof of concept to move towards using the camera instead of a bluetooth scanner we currently use on our sales force WM5/6 devices ….

    Thanks! - great product btw

     
  • spadix

    spadix - 2010-05-27

    First, I would suggest that you try the latest Xcode and iPhone SDK (3.2.2).

    It's hard to say what is wrong without seeing any details, but it sounds like your project is not setup correctly (eg, how did info.plist get in Copy Bundle Resources?).  The tutorial has a detailed list of integration steps; you should run through this to get oriented:
    http://sourceforge.net/apps/mediawiki/zbar/index.php?title=HOWTO:_Add_a_barcode_reader_to_an_iPhone_app

     
  • David Gretlein

    David Gretlein - 2010-05-28

    Hi spadix -
    That sample is where I started … and have a couple of questions for you then … please:
    1) With this instruction, "First add the ZBar library as a project dependency" from where in the new project do I <ctrl>click (since I am developing on an iMac) to "Add -> Existing Files…?
    - I have been clicking on the MyApp project under the Groups & Files

    2) I believe I did steps 2 through 4 in the Build settings
    3) I believe I did steps 1 and 2 in the Code changes section

    Step 3, "Connect MyAppViewController "resultText" outlet to the TextView" …. please explain.  Same for "Connect RoundedRectButton(Scan) event TouchUpInside to MyAppViewController action "scanButtonTapped"".

    I take it "resutlText" and "scanButtonTapped" are the Interface Builder Identity names, but I do not understand the Connect function.

    Thanks !

     
  • spadix

    spadix - 2010-05-28

    > where in the new project do I <ctrl>click
    > I have been clicking on the MyApp project under the Groups & Files

    Yep, you open the context menu from the "MyApp" project under "Groups & Files" (the first item in the list).  The context menu should have an "Add >" entry, with "Existing Files…" in it's sub-menu

    > I do not understand the Connect function

    resultText is the property of MyApp that is marked as "IBOutlet" - this lets you assign an object instanced in Interface Builder (IB) to a property of your app so you can manipulate it at runtime.

    scanButtonTapped is the method of MyApp that is marked as "IBAction" - this lets you assign, from IB, methods to be activated when specific events occur.

    Once you have marked IBOutlet and IBAction in your interface, the assignments can be made (connected) from IB:

    Connect MyAppViewController "resultText" outlet to the TextView:
    * right-click MyAppViewController
    * in the popup, click and hold on the little circle to the right of resultText (it will become a plus when you hover)
    * drag the rubber-band line to the TextView instance, either in the xib list view, or in the view layout itself
    * release the drag when the TextView is highlighted - you should see the connection recorded

    Connect RoundedRectButton(Scan) event TouchUpInside to MyAppViewController action "scanButtonTapped"
    * similarly, right-click the button and drag from TouchUpInside to the view controller
    * select scanButtonTapped in the window that pops up at the destination

    You really should refer to the tool docs or one of the many tutorials on the web, which describe this connection procedure in detail…

    hope that helps,
    -spadix

     

Log in to post a comment.