CorePlot 1.0 + LLVM GCC 4.2 + ARC - How to?

我的梦境 提交于 2020-01-05 04:16:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!