How can i use Objective-C's Property feature in GNUstep?

南笙酒味 提交于 2019-12-10 11:09:01

问题


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

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.

Can i use Property feature in GNUstep.

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

Thanks you for your time.


回答1:


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.




回答2:


Now you can use Clang 3.3 + libobjc2 + GNUstep to compile all the current Objective-C 2.0 language features. (blocks/ARC/properties...)

But if you're on Windows, I think you may have some trouble to run Clang...




回答3:


Quick answer is that out-of-the-box, you can't. Version 2.0 of the language specification is specific to Apple's implementation. See here for a summary.



来源:https://stackoverflow.com/questions/8419827/how-can-i-use-objective-cs-property-feature-in-gnustep

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