Sunday, June 24, 2007

Objetive C - Learn on Windows

At last I am convinced that I should now move to Mac platform. Although Java is my primary dev platform , I know that the real fun will be developing using Cocoa for Mac. Now.. I never even looked at a Objective C program and was curious to learn it before buying my MacBook Pro, used my friend Mr. Google for resources but few point to Objective C on Windows, I was disappointed, but some how managed to get all info. Here is the info. for enthusiasts out there

Basically there are two options to compile /run Objective C programs

1) Use a Linux distro like Ubuntu on Virtual PC and start compiling your programs using gcc (Yes ..it compiles Objective C)
2) Download GNUStep for Windows from http://www.gnustep.org/ ,to write Objective C in your favorite old Windows Box

Option 1 is fairly simple , but if you are a Linux hater Option #2 is also an easier one

1) On Installing GNUstep on your windows box, it will provide you with developer tools like gcc
2) You can use command line provided by Gnustep if you are familiar with *nix by writing programs in vi and compiling manually using gcc
3) You can even use your favorite editor like EditPlus or TextPad to write programs easily (I prefer this..for sake of keeping it simple)

To Compile and Run your programs, configure you editor to invoke the following on your source files (
  gcc *.m -lobjc -lm

Execute the resulting a.out file

There is good information in
http://en.wikibooks.org/wiki/Programming:Objective-C


I am still learning Objective C , please let me know if there are
better ways to do all this :-)