I documented the entire process including the commands I used to build each of the libraries for both the simulator and an iOS device. In order to put this documentation in a more permenant place than my harddrive (selfish reasons) and for posterity (altruistic reasons), I'll post to this thread my notes for each of the libraries.
Relevant Compiler Flags:
Architecture
- -arch i386 or i686 (seem to by synonymous) for simulator
- -arch armv7 for newer iOS devices
- -arch armv6 for some older iphones
- -isysroot ${XCODE}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${IOS_TARGET}.sdk
- ${XCODE} is /Applications/Xcode.app/Contents/Developer for Xcode 4.3
- ${PLATFORM} is
- iPhoneOS for devices
- iPhoneSimulator for simulator
- ${IOS_TARGET} is 5.1 for the latest SDK
- -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 for iOS 4.0 (required by OGRE headers)
- -miphoneos-version-min=${IOS_TARGET} for devices
- -mmacosx-version-min=${OSX_TARGET} for simulator (use current OSX)
- llvm-gcc executables are in ${XCODE}/Platforms/${PLATFORM}.platform/Developer/usr/bin
- llvm-clang executables are in ${XCODE}/Developer/usr/bin
Objective C for the simulator
- -fobjc-abi-version=2
- uses version 2 of the objective-c ABI, which is the version of the SDK libraries. If you miss this one you'll undefined symbol link errors because symbol names are different
- -fobjc-legacy-dispatch
- uses version 1 of the objective c message dispatching (no rebinding or virtual tables or something like that) which is apparently also what is used by the simulator
Useful downloads for OSX
- Doxygen: http://www.stack.nl/~dimitri/doxygen/do ... #latestsrc
- pkg-config: http://macpkg.sourceforge.net/
- macports (provides wget,autotools): http://www.macports.org/install.php
- cmake: http://www.cmake.org/cmake/resources/software.html
- I put installed all my libraries in a development root using CMAKE_INSTALL_PREFIX or --prefix= for configure scripts instead of installing directly to the system SDK roots
- I ended up writing perl scripts to call configure or cmake because I kept having to change things, I'll post those here so that the relavent things can be changed easily and reused for others