开发者

Linux Clang and Objective-C base library

I have been experimenting with Objective-C using GCC + GNUstep on an Ubuntu system.

Now regarding the LLVM 开发者_JAVA技巧Clang compiler, what kind of *step library does it offer? Does it use the GNUstep on the Apple Cocoa? I am mostly interested in the base library - collections, streams, etc. The website doesn't give much information.


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:

  • GNUstep
  • Cocotron
  • Cocoa
  • ObjFW

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


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 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜