You can visite GNUstep site to find GNUstep installer for Windows:www.gnustep.org/experience/Windows.html.
From this page I downloaded and installed in order (as advised in the page):
GNUstep MSYS System | Required | 0.28.1 | - | MSYS/MinGW System |
GNUstep Core | Required | 0.28.0 | - | GNUstep Core |
GNUstep Devel | Optional | 1.3.0 | - | Developer Tools |
The installation procedure created a program group in the Start/All Programs menu called GNUstep and in there I found Shell application which simulates Unix console.
I used Notepad to create a simple Objective-C file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| #import <Foundation/Foundation.h> int main ( int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog( @"Hello World!" ); [pool drain]; return 0; } |
and saved the file with ".m" extension. When I tried to compile it the first time it failed to find the file so I moved it under C:\GNUstep\msys\1.0\home\dreriMIX folder which was created by the installer.
I ran the command
gcc `gnustep-config --objc-flags` -L /GNUstep/System/Library/Libraries objC1.m -lgnustep-base -lobjcand that created an application called a.exe which when I run (use ./a in the console) I get:
2011-06-08 11:27:14.354 a[20272] Hello World!
Success!
=========================
Copied from http://drerimix.blogspot.com/2011/06/developing-objectice-c-on-windows-pc.html
0 comments:
Post a Comment
Do not SPAM, please...