CorePlot 1.0 + LLVM GCC 4.2 + ARC - How to?
Asked Answered
S

1

1

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?

Sassy answered 26/5, 2012 at 19:41 Comment(0)
C
4

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.

Churlish answered 26/5, 2012 at 21:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.