Re: GNUStep under Windows

Xavier Glattard <[email protected]> Fri, 29 Feb 2008 17:34:08 +0100
Newsgroups gmane.comp.lib.gnustep.user
Message-ID <[email protected]>
hi

First copy, paste and save hello.m :

#include <objc/object.h>
#include <stdio.h>

@interface Hello : Object
{ }
+ world;
@end

@implementation Hello
+ world
{
   puts("Hello world !");
}
@end

main()
{
   [Hello world];
}

Then compile it : (in a MinGW/MSYS environment)

$ gcc hello.m -o hello -lobjc
$ ./hello
Hello world !
$

If it works then your mingw objc compiler is ok.
Next : install GNUstep

Xavier

Darin Bray a écrit :
> Warning...I am a complete newbie.  I am trying to learn how to program 
> Objective-C.  My ultimate goal is to code for the Mac, but unfortunately 
> my only Mac is my home machine which I get very little time to work on.  
> As a result I was trying to setup my Windows laptop to use GNUStep so I 
> could work on my programs more often.  I have tried installing GNUStep 
> several ways, and have not had any success.  I tried the method using 
> MingW (I already had this installed for compiling C programs).  This 
> didn't work as I was unable to get all of the pieces downloaded for 
> GNUStep.  I ended up downloading the Core and System Windows installers 
> from the GNUStep website.  These installed fine, and appear to have all 
> the pieces.  However I am still unable to compile a program.  I believe 
> my problem lies in the include directories for my headers and 
> libraries.  Could someone who is using this setup give me an example of 
> their gcc command line to build an application.
> 
> Thanks in advance for the help
> 
> Darin