CorePlot 1.0 + LLVM GCC 4.2 + ARC - 如何? [英] CorePlot 1.0 + LLVM GCC 4.2 + ARC - How to?

查看:130
本文介绍了CorePlot 1.0 + LLVM GCC 4.2 + ARC - 如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个小型个人项目中尝试CorePlot来绘制一些条形图。我使用Xcode 4.3.2和ARC启动项目,认为它会使我的生活更轻松...问题是,当使用GCC 4.2 - 编译器不能识别 @autorelease 。我已经过去使用:

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;

但是我得到错误说NSAutoreleasePool不可用在ARC ...有人有任何建议?

However I get the error saying that NSAutoreleasePool isn't available in ARC... Does anyone have any recommendations?

推荐答案

这与Core Plot无关。

This really has nothing to do with Core Plot.

仅当使用LLVM编译器3.0或更高版本时才支持自动引用计数。 LLVM GCC 4.2不支持ARC,因此您需要将项目切换到使用完整的LLVM编译器。

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.

这篇关于CorePlot 1.0 + LLVM GCC 4.2 + ARC - 如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆