2

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.

Dimitrios Menounos
  • 545
  • 1
  • 6
  • 17

4 Answers4

8

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.

Ivan Vučica
  • 9,529
  • 9
  • 60
  • 111
6

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.

puzzle
  • 6,071
  • 1
  • 25
  • 30
2

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.

Community
  • 1
  • 1
MKroehnert
  • 3,637
  • 2
  • 34
  • 43
  • Thank you, that blog post was very helpful. I was not sure whether the foundation framework (NS* classes) was dependent upon the language runtime implementation. Since GNUstep and GCC are both GNU, and also up until recently there was no other ObjC compiler for linux, I supposed that there could be some strong coupling between them. – Dimitrios Menounos Jul 25 '11 at 14:33
0

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.

SqAR.org
  • 557
  • 6
  • 15