Download from here: http://www.gnustep.org/ (http://www.gnustep.org/experience/Windows.html)
Install all of these bits:
- GNUstep MSYS System
- GNUstep Core
- GNUstep Devel
Then I created a simple program in a file called hello.m:
#import <stdio.h>
int main(int argc, const char *argv[]){
int i = 1;
int *iptr;
iptr = &i;
*iptr = 2;
printf("result %d",*iptr);
return 0;
}
int main(int argc, const char *argv[]){
int i = 1;
int *iptr;
iptr = &i;
*iptr = 2;
printf("result %d",*iptr);
return 0;
}
Question: Why isn't it easier to format code in this blog?
Anyway, this is a fairly simple piece of code, doesn't do much, a little with pointers (which as a Java developer I never had to worry about, and printf). It compiles, it runs, it displays data! easy! to compile I use this line:
g++ hello.m -o hello
To run it I type:
./hello.exe and the output is: result 2
Simples, works like a charm, step one complete Big tick in the box
No comments:
Post a Comment