help-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem in compiling in windows


From: Germán André Arias Santiago
Subject: Re: problem in compiling in windows
Date: Sun, 11 Jan 2009 20:21:16 -0600

Hi. Well I'm not sure how work only with Objective-C. But, if you
install GNUstep (the installer are here
http://gnustep.org/experience/Windows.html). You need do the fallow
steps

1) Run GNUstep -> Shell. This make the directory GNUstep/home/usuario

2) Make a folder to your project. (for example
GNUstep/home/usuario/example

3) Make one file with this code 

        #include <Foundation/Foundation.h>
        #include <stdio.h>

        @interface Hello : NSObject
        { 
        }
        +(const char*)world;
        @end


        @implementation Hello
        +(const char*)world
        {
          return "Hello world !";
        }
        @end

        int main(void)
        {
          printf("%s\n", [Hello world]);
          return 0 ; 
        } 

save this file like, for example, example.m

4) Make a second file with this code

        include $(GNUSTEP_MAKEFILES)/common.make
        TOOL_NAME = example
        example_OBJC_FILES = example.m
        include $(GNUSTEP_MAKEFILES)/tool.make

save this file with the name GNUmakefile

5) In the shell (when you run the shell you are in the place
GNUstep/home/usuario) 
     
    cd example
    make

this make the tool example int the folder obj inside the folder example.

6) Now you can run your program, in the shell

        cd obj
        ./example

 
Hello world !

There are more information in
http://gnustep.org/developers/documentation.html






reply via email to

[Prev in Thread] Current Thread [Next in Thread]