Friday, August 21, 2009

Record : install gnustep and make gui application

1. download gnu-system and gnu-core setup.exe for windows
from http://ftpmain.gnustep.org/pub/gnustep/binaries/windows/
2. setup onto C:\GNUStep
3. ren C:\GNUstep\bin\rxvt-save.exe C:\GNUstep\bin\rxvt.exe
4. insert "cd C:\GNUstep\mingw\lib" at startup of C:\GNUstep\msys.bat
5. launch C:\GNUstep\msys.bat
6. write some code as source.m

#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>

int main (void)
{
NSAutoreleasePool *pool;
pool = [NSAutoreleasePool new];
[NSApplication sharedApplication];
NSRunAlertPanel (@"Kim TongHyun Test", @"Hello from the GNUstep AppKit",
nil, nil, nil);
return 0;
}

7. compile on gnustep sh console

gcc -o kim.exe source.m -I/GNUstep/Syste/Library/Headers -L/GNUstep/System/Library/Libraries/ -objc -lgnustep-base -gnustep-gui -fconstant-string-class=NSConstantString

8. launch kim.exe



but if you have mingw already, you can do this on cmd console.

gcc -o kim.exe source.m -IC:\GNUstep\GNUstep\Syste\Library/Headers -LC:\GNUstep\GNUstep\System\Library\Libraries\ -objc -lgnustep-base -lgnustep-gui -fconstant-string-class=NSConstantString


No comments: