Objective C seems to gain popularity nowadays. My only exposure to this language is through random snippets I saw here and there, mostly written by friends of mine, chasing the dream of becoming the next iPhone millionaire. And I have to say: I find it ugly. I mean really really ugly!
People say though, that once you get used to it, it seems natural and it has advantages (read: late binding) that make it a powerful tool for creating applications.
Well, after all its just another programming language. So I thought I’d give it a try. Preferably without owning a mac.
Here is how I did it:
- Download cygwin – install it with the default settings.
- That’s about it! Cygwin comes with an objective C compiler, so you are good to go once you install it.
How to write a first objective c test program:
#import <stdio.h>
int main(int argc, char *argv[]) {
printf("Hello, from objC!\n");
}
Create a file named “hello.m” in your cygwin home directory containing the above code. Then open a cygwin prompt and write the command: gcc -o hello hello.m
And there you have it, a free development environment to try out the language. Your next step (pun intended) might be a good tutorial or a book describing the language. I suggest something that covers the language only, not the common APIs (GNUstep, Cocoa, whatever). If you think you can stand the language itself, you can then try to learn the APIs and create that iPhone app you were dreaming about!
Related Articles
- The pros and cons of developing for the iPhone and Android (infoworld.com)
Posted by mgeorgoulopoulos 

