Objective C Hello World

In this section I will show you how to develop Objective
C Hello World program. In the next section I will show you how to compile and
execute the Objective C Hello World example on windows machine.
Create first objective-c program ‘hello.m’
This is a simple program to print Hello, World!
#include <stdio.h>
int main(void)
{
printf("Hello, World!");
return ;
}
|
Save this program with .m extension here 'hello.m' in
newly created directory c:/objectiveC.
On the unix or Mac OS x machine save the file in any of
your favorite directory. In the next section we will show you how download and
install GNU c compiler on your windows machine to compile the application. GNU
compiler can be used to compile the Objective C programs.

|