Dimitrios Menounos
Dimitrios Menounos

Reputation: 555

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

Upvotes: 2

Views: 4920

Answers (4)

SqAR.org
SqAR.org

Reputation: 607

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.

Upvotes: 0

Ivan Vučica
Ivan Vučica

Reputation: 9679

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.

Upvotes: 9

MKroehnert
MKroehnert

Reputation: 3737

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.

Upvotes: 2

puzzle
puzzle

Reputation: 6131

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.

Upvotes: 6

Related Questions