I am trying to install core-plot into my iPhone project following these directions. Coreplot requires that I use the LLVM gcc 4.2 compiler, and this is causing notation problems.
Because I am using LLVM gcc 4.2, the @autorelease notation produces the error "Expected expression before '@' token" in main.m.
int main(int argc, char *argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
Because of this I got rid of the @autoreleasepool notation and changed main to look like the following.
int main(int argc, char *argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
[pool release];
return retVal;
}
However this gives the 'NSAutoreleasePool is unavailable" error since I am using ARC. So I added the -fno-objc-arc compiler flag to main.m, which gave me and "unrecognized command line option "-fno-objc-arc" error.
Is there a way to resolve the notation problems caused by using LLVC gcc 4.2 while using ARC in my project?