How to use Obj-C 2.0 with GNUstep?

I am aware of the existence of libobjc2, and I understand that I need to use clang, not GCC, but I cannot find any basic instructions on what makes the compilation process different.

Can anyone give explicit step-by-step instructions on how to purchase, configure, compile and use GNUstep with Objective-C 2.0 in Ubuntu ?

+7
objective-c ubuntu makefile gnustep
source share
2 answers

Since the GNUStep ObjC2 link is often set, I assume you looked. I would like to point out this, however:

For more complex functions that are currently only supported when compiling with Clang, you will need the GNUstep runtime. This is not currently considered a finished product. It should work as a replacement for the GCC runtime, but some of the advanced features have not passed the test.

Frequently asked questions are also prompted by the following:

If you are using the latest version of GCC to compile your code, then you should have a copy of the Objective-C runtime library that comes with your compiler.

If you compile the -fobjc-nonfragile-abi flag, you will use the new ABI. This is supported only at runtime by GNUstep. This adds:

  • Own introspection
  • Introspection on additional protocol methods
  • Non-Artificial Instance Variables
  • Proxy forwarding support.

So, if you are looking for older functionality through GCC, this tutorial will do the job beautifully, like this one. You have explicitly indicated that you want to do this using the functions provided by Clang (via libobjc2), which has its own documentation bed.

Getting the release of Clang and tuning seems pretty shredded and dry. The LLVM Getting Started document is exceptionally reliable (the full documentation archive is here ), which should provide an understanding that the backend is configured and correctly composed. Some additional understanding of the expected build procedure can be found here .

However, compiling the Objective-C application in Clang seems extremely underrated and untested at the time of this writing. As functions become available and the code base stabilizes, I assume more user documentation will go live.

+2
source share

According to the GNUstep Wiki, you just need to compile your code with -fblocks and -fobjc-nonfragile-abi . Then you simply use the language functions in your code.

-one
source share

All Articles