Trying to build iPhone Xcode template in iphone2ios branch, iOS SDK 5.1

I’m getting linking errors with the iPhone Xcode Template in the latest iphone2ios branch under iOS SDK 5.1. See below (the ld warnings probably aren’t the problem? but glu.a having the wrong architecture is worrisome, and the errors at the bottom (e.g. could not find __Z13ofSetupOpenGLiii referenced from main.o) are definitely worrisome… Any ideas? Am I on the wrong branch? Should I use latest develop branch? 007 release?

  
ld: warning: directory not found for option '-L/Users/stolrsky/Desktop/ProcessingCC/p2iOS/runtime/openFrameworks/apps/p2iOSapps/iPhone Empty Example/../../../libs/gluIphone'  
ld: warning: directory not found for option '-L/Users/stolrsky/Desktop/ProcessingCC/p2iOS/runtime/openFrameworks/apps/p2iOSapps/iPhone Empty Example/../../../libs/FreeImage/lib/iphone'  
ld: warning: directory not found for option '-L/Users/stolrsky/Desktop/ProcessingCC/p2iOS/runtime/openFrameworks/apps/p2iOSapps/iPhone Empty Example/../../../libs/FreeImage/lib/linux'  
ld: warning: directory not found for option '-L/Users/stolrsky/Desktop/ProcessingCC/p2iOS/runtime/openFrameworks/apps/p2iOSapps/iPhone Empty Example/../../../libs/FreeImage/lib/linux64'  
ld: warning: directory not found for option '-L/Users/stolrsky/Desktop/ProcessingCC/p2iOS/runtime/openFrameworks/apps/p2iOSapps/iPhone Empty Example/../../../libs/FreeImage/lib/vs2008'  
ld: warning: directory not found for option '-L/Users/stolrsky/Desktop/ProcessingCC/p2iOS/runtime/openFrameworks/apps/p2iOSapps/iPhone Empty Example/../../../libs/freetype/lib/iphone'  
ld: warning: directory not found for option '-L/Users/stolrsky/Desktop/ProcessingCC/p2iOS/runtime/openFrameworks/apps/p2iOSapps/iPhone Empty Example/../../../libs/freetype/lib/vs2008'  
ld: warning: directory not found for option '-L/Users/stolrsky/Desktop/ProcessingCC/p2iOS/runtime/openFrameworks/apps/p2iOSapps/iPhone Empty Example/../../../libs/glu/lib/iphone'  
ld: warning: directory not found for option '-L/Users/stolrsky/Desktop/ProcessingCC/p2iOS/runtime/openFrameworks/apps/p2iOSapps/iPhone Empty Example/../../../libs/glu/lib/vs2008'  
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/openFrameworks/libs/poco/lib/armv6'  
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/openFrameworks/libs/poco/lib/linux'  
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/openFrameworks/libs/poco/lib/linux64'  
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/openFrameworks/libs/poco/lib/osx'  
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/openFrameworks/libs/poco/lib/vs2008'  
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/openFrameworks/libs/poco/lib/win_cb'  
ld: warning: directory not found for option '-L../../../libs/poco/lib/ios/** ../../../libs/poco/lib/ios'  
ld: warning: ignoring file /Users/stolrsky/Desktop/ProcessingCC/p2iOS/runtime/openFrameworks/apps/p2iOSapps/iPhone Empty Example/../../../libs/glu/lib/ios/glu.a, file was built for archive which is not the architecture being linked (armv7)  
Undefined symbols for architecture armv7:  
  "__Z13ofSetupOpenGLiii", referenced from:  
      _main in main.o  
  "_ofxiPhoneAlerts", referenced from:  
      __ZN7testApp5setupEv in testApp.o  
  "__ZN23ofxAccelerometerHandler5setupEv", referenced from:  
      __ZN7testApp5setupEv in testApp.o  
  "_ofxAccelerometer", referenced from:  
      __ZN7testApp5setupEv in testApp.o  
  "__Z8ofRunAppP9ofBaseApp", referenced from:  
      _main in main.o  
ld: symbol(s) not found for architecture armv7  
clang: error: linker command failed with exit code 1 (use -v to see invocation)  

I know it’s been two years from this post, but this is as good place as any to publish a solution to this problem.

This happened to me working in Xcode 4 targeting an ancient but serviceable armv6 iOS 4.2.1 device (iPod Touch 2G). You have to specify the target architecture as “armv6 armv7” both in your project and in the included openframeworks project.

Otherwise OF will be built only as armv7 and your project as armv6, and the link stage will fail.