Thomas, Good timing. I just sorted this out. The version I posted recently (namely ghc-iphone-binary-1.5-sdk-3.0.tar.bz2) was built with an old Xcode, against SDK 3.0. The symlink you describe is the correct thing to do. cd /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin sudo ln -s i686-apple-darwin10-gcc-4.0.1 i686-apple-darwin9-gcc-4.0.1 2. Inside the xcode_3.2.5_and_ios_sdk_4.2_final.dmg volume there's a directory called Packages, which the finder doesn't let you get to. Go in with the command line and copy the file iPhoneSDK3_0.pkg onto the desktop or somewhere you can get to it with the finder. Install that by double-clicking. SDK3.0 seems like the best choice for the AppStore now, since it's the lowest you can get away with. You may find that with SDK3.0 present, it will work if you set your project to iOS 4.2. The other option, if you want to use the new SDK, is to build GHC-iPhone from source, which should not be difficult, though when I switched from SDK 2.2.1 to SDK 3.0 I needed to make a minor change (I added this as a patch to the source code directory). Newer versions of GHC are on their way for Android, and we will probably end up porting back to iPhone. Keegan McAllister (kmc) is working on that. --- Having said all that, I'm now getting link errors, like this: Undefined symbols: "_OBJC_CLASS_$_NSAutoreleasePool", referenced from: objc-class-ref-to-NSAutoreleasePool in main.o objc-class-ref-to-NSAutoreleasePool in AppController.o "_OBJC_CLASS_$_NSTimer", referenced from: objc-class-ref-to-NSTimer in AppController.o "_OBJC_CLASS_$_NSValue", referenced from: objc-class-ref-to-NSValue in AppController.o "_OBJC_CLASS_$_NSBundle", referenced from: I tried changing from gcc 4.2 to gcc 4.0 like this: project top level in the tree view and selecting GetInfo, then Build tab, then C/C++ compiler version to 4.0. But that didn't work either. Now I'm getting this: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:13: error: syntax error before 'AT_NAME' token So, I'll see what I can do about this and post again. Steve On 20/12/10 1:21 PM, thomas burt wrote:
Hello,
I was wondering if anyone has been developing iOS 4.2 apps on Snow Leopard using a recent version of Xcode (3.2.5)
The top-level issue for me is that the ghc-iphone binary I got from http://projects.haskell.org/ghc-iphone/ is trying to compile with i686-apple-darwin9-gcc-4.0.1 but the version on my machine is i686-apple-darwin10-gcc-4.0.1.
Symlinking 10 to 9 throws a ton of errors about missing "Math.h" and many other headers, which may also be because things have been renamed and moved around a bit.
I just thought I would ask first, has anyone already come across this problem? If you are familiar with this project enough to suggest a solution please do.
Thanks, and kudos to all those working hard to make Haskell applications on iPad a possibility!
Thomas Burt
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone