问题
I'm trying out CorePlot in a small personal project to draw some bar graphs. I started the project using Xcode 4.3.2 and ARC, thinking it'd make my life easier... The problem is, when using GCC 4.2 - the compiler doesn't recognise @autorelease
. I got past that using:
int retVal = 0;
// @autoreleasepool {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([kerrAppDelegate class]));
[pool drain];
// }
return retVal;
However I get the error saying that NSAutoreleasePool isn't available in ARC... Does anyone have any recommendations?
回答1:
This really has nothing to do with Core Plot.
Automatic reference counting is only supported when using the LLVM Compiler 3.0 or higher. LLVM GCC 4.2 doesn't support ARC, so you'll want to switch your project over to use the full LLVM Compiler.
来源:https://stackoverflow.com/questions/10769230/coreplot-1-0-llvm-gcc-4-2-arc-how-to