GNUstep Installation Process For Windows
- Visit The URL: http://ftpmain.gnustep.org/pub/gnustep/binaries/windows/
- Download the exe file gnustep-system-0.19.2-setup.exe
- Then Download gnustep-core-0.19.2-setup.exe
Remember one thing if you are downloading gnustep-system of any version you must have to download the same version for gnustep-core.
For example if you have downloaded gnustep-setup-0.22.1-setup.exe then you must have to download gustep-core-0.22.1-setup.exe otherwise your code will not run.
- Install first the gnustep-system-0.19.2-setup.exe then install gnustep-core-0.19.2setup.exe. Don’t try to install in vice versa order.
- Now you got the gnustep for windows then go to start>all program> GNUstep> shell
- Now open the notepad editor and write the following code in notepad
#import
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc]
init];
NSLog (@"Anil Kumar Yadav has Run the First Objective C
program!");
[pool drain];
return 0;
}
save it as hello.m in your C:/GNUstep/home/foldername
Remember foldername is the name when you first time start the shell it create the envoirment and make a folder by the name of your computer name in C:/GNUstep/home folder. So don’t be panic.Okay
- Go to your shell and type the following command gcc -o hello hello.m -I /GNUstep/System/Library/Headers -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base -constant-string-class=NSConstantString
- This command will create a hello.exe file in your foldername folder.
- Again in shell type the command ./hello.exe
Finally you will be able to see the output in the shell.
Conguratulation you wrote your first Objective C program successfully.
Need any clarification write me to : [email protected]