Linux Clang and Objective-C base library

☆樱花仙子☆ 提交于 2019-12-06 10:02:56

LLVM Clang is a compiler. It is completely independent from the Cocoa / Cocoa Touch frameworks on OS X / iOS, or any other frameworks or platform, for that matter.

Like MKroehnert and puzzle said, neither LLVM Clang nor GCC actually come with a set of frameworks. GCC comes with only a small runtime that doesn't provide NSArray, NSString, not even NSObject.

Frameworks are provided by, for example:

ObjFW is the lightest of them all, but on any UNIX, I'd recommend you go the GNUstep route.

MKroehnert

Like puzzle said in his answer clang is a compiler like gcc. On linux you can also use clang instead of gcc together with the GNUstep libraries (which provide the NS* classes you were asking about).

For more information see GNUstep Objc2 FAQ or this blogpost for example.

Like others said, LLVM Clang is just a compiler. But you can have all the modern features of Objective-C 2.0 on Ubuntu using Clang, the modern GNUstep Objective-C 2.0 runtime and GNUstep itself. Have a look here for a how to:

http://wiki.gnustep.org/index.php/GNUstep_under_Ubuntu_Linux

That page is maintained by the GNUstep developers and contains bash scripts to compile and install everything needed for Objective-C 2.0 from scratch for different versions of Ubuntu-Linux using Clang and the GNUstep Objective-C runtime, which can be found here: https://github.com/gnustep/libobjc2 . It would be moot to copy those lengthy scripts to Stackoverflow since they would get out of date sooner or later. So follow that link to get everything from first hand.

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