如何在GNUstep中使用Objective-C的属性功能? [英] How can i use Objective-C's Property feature in GNUstep?

查看:119
本文介绍了如何在GNUstep中使用Objective-C的属性功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在GNUstep(使用Windows)中使用Objective-C 2.0功能.

I'm trying to use Objective-C 2.0 feature Property in GNUstep(using Windows).

但是我不能使用@property符号和@synthesize.

But i can't use @property sign and @synthesize.

尽管我所有的代码都是正确的,但是编译器无法编译我的属性代码.

Although All of my codes are correct,compiler can't compile my property code.

编译器也无法理解"@"符号.

Compiler also can't understand "@" sign.

我可以在GNUstep中使用属性功能.

Can i use Property feature in GNUstep.

如果可以使用,请告诉我该怎么做?

If it's can use,Please tell me how can i do that?

谢谢您的时间.

推荐答案

GNUStep GCC编译器不支持@property(或其他任何Objective-C 2.0语言更改).但是,如果可以使用Clang,则可以在编译时访问Objective-C 2.0功能.只要您能找到与Objective-C 2.0兼容的运行时,就一切就绪.参见 http://wiki.gnustep.org/index.php/ObjC2_FAQ# which_Bits_of_Objective-C_2_Work.3F .

The GNUStep GCC compiler does not support @property (or any of the the other Objective-C 2.0 language changes). However, if you can use Clang, you have access to Objective-C 2.0 features at compilation. As long as you can find an Objective-C 2.0-compatible runtime, you're all set. See http://wiki.gnustep.org/index.php/ObjC2_FAQ#Which_Bits_of_Objective-C_2_Work.3F.

这篇关于如何在GNUstep中使用Objective-C的属性功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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