You can use Objective C inside the Windows environment. If you follow these steps, it should be working just fine:html
GNUstep MSYS Subsystem
(MSYS for GNUstep), GNUstep Core
(Libraries for GNUstep), and GNUstep Devel
C:\GNUstep\GNUstep\System\Library\Headers\Foundation
1 and ensure thatFoundation.h
existsgcc -v
to check that GNUstep MSYS
is correctly installed (if you get a file not found error, ensure that the bin
folder of GNUstep MSYS
is in your PATH
)Use this simple "Hello World" program to test GNUstep's functionality:web
#import <Foundation/Foundation.h> int main(int argc, char**argv) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLog(@"headfile dir is ok\n"); [pool release]; return 0; }
Go back to the command prompt and cd
to where you saved the "Hello World" program and then compile it:2ide
gcc -o helloworld.exe <HELLOWORLD>.m -I /GNUstep/GNUstep/System/Library/Headers-L /GNUstep/GNUstep/System/Library/Libraries-std=c99 -lobjc -lgnustep-base -fconstant-string-class=NSConstantString
Finally, from the command prompt, type helloworld
to run itthis
All the best, and have fun with Objective-C!spa