Objective-C/GNUStep on Windows Eclipse

Objective-C is all fine and crispy and should do for a hell of a programming enviroment if only you could install it properly in no time, with a minimum of fuss for all parties involved. In this case its not that simple.

There are some runtimes there for Objective-C, most notably the one running of Apple OSX, but since we don't have that one available, unless of course, when I really get to it and just buy my mac sometime next year, then the one package which does a pretty decent job is GNUStep, the free software foundation classes for Objective-C.

For an IDE, Eclipse is by far the most advanced integrated development IDE out there, so I will be using it.

1) First things First; Install Eclipse with C/C++ IDE support.

Easy, just go to this site and get the Distribution for C/C++ that packages Eclipse+CDT in one convenient package. Not that its terribly difficult to do it manually, since on Eclipse, evething is a breeze.

Then we get the GNUStep package, the most easy way to do this is to get this package http://www.gnustep.org/resources/sources.html#windows. It doesn't have the most up-to-date always but for now, I will use this one here.

After the installation we need to set up the environment:

1) On Workspace Settings
->C/C++->File Types : add ".m" as a "C Source File" file extension.

On Project Settings->C/C++ Build

2) ->Enviroment(tree)->add to PATH variable this entry "C:\GNUstep\Development\msys\1.0\mingw\bin\"

3) ->Tool Chain Editor
: Current Tool Chain set to MinGW GCC for both Release and Debug.

4)->Directories(tree)->add two paths "C:\GNUstep\System\Library\Headers" and "C:\GNUstep\System\Library\Headers\objc"

5) ->Settings->Tool Settings(toolbar)->GCC C Compiler->Miscelaneous(Tree)->Other Flags add "-fconstant-string-class=NSConstantString" so it ends up with "-c -fmessage-length=0 -fconstant-string-class=NSConstantString" to avoid "undefined NSConstantString" error.

6) ->Settings->Tool Settings(toolbar)->GCC C Linker->Libraries(tree) add 2 entries "objc" and "gnustep-base" and on the same page add "C:\GNUstep\System\Tools" to library search path.

At this point it should build nicely. Then we run, the dlls aren't found.

1) At Project Settings->Run/Debug Settings->Enviroment(tab) : add to PATH variable "c:\gnustep\system\tools", this takes care of both objc lib and gnu-base lib, but there are two other files on other paths, its better to just copy them to this directory, i've tried to add more entries with commas on here but it just didn't work that way. So the copy the remaider .dll files to this directory resolved the issues.

And presto, its done.

Efty Edge  – (28 de Março de 2013 às 07:31)  

Hi.

Can you please update your fantastic Manual. The Settings like 'Directories(tree)' didn't fetch to the Eclipse JUNO Release.

Thanx in advance.
Efty

Enviar um comentário

About This Blog

  © Blogger template Shush by Ourblogtemplates.com 2009

Back to TOP