Wednesday, October 5, 2011

Objective C Programming on Windows

Source

Steps : 
1. Download and install these 3 exes : GNUStep 0.23 (System | Core | Devel)
2. Open Programs -> Gnustep -> Shell
3. Create helloworld.m :

 #import <Foundation/Foundation.h>
  int main (int argc, const char * argv[]) { 
  NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];  
 NSLog (@"Hello World!"); 
  [pool drain];  
 return 0;
 }

 4. gcc -o helloworld helloworld.m -I /GNUstep/System/Library/Headers -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base -fconstant-string-class=NSConstantString

No comments:

Blog Archive