title: xcode 4.5 - symbols not found for architecture i386 (zbar)
body: <p>I have a project which uses the zbar-sdk (a barcode scanning library).</p>
  
  <p>After updating my machine to xcode 4.5 and ios6sdk I am having some troubles.</p>
  
  <p>I was able to build to the simulator without touching anything about my project. This is using the latest zbar 1.2 library.</p>
  
  <p>I then wanted to build to my ios6 device for testing, and thats when I got an error.</p>
  
  <p>After some googling on the zbar developer forum, I seen that I needed to get the zbar source and build the libzbar.a for armv7 and armv7s as this has not yet been done by the zbar developer. </p>
  
  <p>See - <a href="http://sourceforge.net/projects/zbar/forums/forum/1072195/topic/5728912" rel="noreferrer">http://sourceforge.net/projects/zbar/forums/forum/1072195/topic/5728912</a></p>
  
  <p>So I did this, re-imported the updated libzbar.a into my project. I then built for my device, and it worked! I was able to get my app onto my testing device and the zbar barcode library worked fine.</p>
  
  <p>I thought that was the end of it, but unfortunately not. </p>
  
  <p>I then tried to build to the simulator (ios6) again, and thats when it fails.</p>
  
  <p>No matter what I cannot get this project to build for both the device and simualtor at the same time and with the same settings :(</p>
  
  <p><strong>My libzbar.a project settings when building my own libzbar.a file:</strong></p>
  
  <p>Architecture: Standard (armv7, armv7s) $(ARCHS_STANDARD_32_BIT)</p>
  
  <p>Build Active Architecture Only: No</p>
  
  <p>Valid Architectures: armv7 armv7s</p>
  
  <p><strong>And my project settings (for myapp) as:</strong></p>
  
  <p>Architecture: Standard (armv7, armv7s) $(ARCHS_STANDARD_32_BIT)</p>
  
  <p>Build Active Architecture Only: No</p>
  
  <p>Valid Architectures: armv7 armv7s</p>
  
  <p>Base SDK: iOS6</p>
  
  <p>iOS Deployment Target: iOS 5.0</p>
  
  <p><strong>And the error when trying to build to the simulator:</strong></p>
  
  <pre><code>ld: warning: ignoring file /Users/blah/iOS App/myapp/ZBarSDK/libzbar.a, missing required architecture i386 in file /Users/blah/iOS App/myapp/ZBarSDK/libzbar.a (2 slices)
  Undefined symbols for architecture i386:
    "_OBJC_CLASS_$_ZBarReaderViewController", referenced from:
        objc-class-ref in mycontroller.o
    "_ZBarReaderControllerResults", referenced from:
        -[mycontroller imagePickerController:didFinishPickingMediaWithInfo:] in mycontroller.o
  ld: symbol(s) not found for architecture i386
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>I have tried tweaking the libzbar.a project settings (e.g. build active architecture set to "YES") but this just results in neither the simulator or device working.</p>
  
  <p>The fact that it works on the device but not the simulator makes me thing there is some weird architecture/project setting causing this.</p>
  
  <p>Any help much appreciated!</p>