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
  1. #import <Foundation/Foundation.h>  
  2. #import <AppKit/AppKit.h>  
  3.   
  4. int main (void)  
  5. {  
  6. NSAutoreleasePool *pool;  
  7. pool = [NSAutoreleasePool new];  
  8. [NSApplication sharedApplication];  
  9. NSRunAlertPanel (@"Kim TongHyun Test", @"Hello from the GNUstep AppKit",  
  10.                 nil, nil, nil);  
  11. return 0;  
  12. }  

7. compile on gnustep sh console
  1. 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.
  1. 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: