Compiling Objective C

In this section we will show you how to compile Objective C program on windows and Max OS x machine.

Compiling Objective C

     

In this section we will show you how to compile Objective C program on windows and Max OS x machine. Compiling Objective C program is necessary as it generates the executable program that can run.

Compiling Objective C on windows

Go to the directory where hello.m example program is saved. You can use the following command.

 

 

$ cd c:/objectiveC

To compile program run the following command
$ gcc -o hello hello.m



This command will create a executable file of given name (here 'hello').

To run the program

$ ./hello

You can see output of the program?

Advertisements

 

We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.

Share on Google+Share on Google+

Compiling Objective C

Posted on: September 12, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

Ads
 

Discuss: Compiling Objective C   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:2
nemo
April 16, 2011
header file dir

when i include any header file from gnu header, it does not recognize it, how can i define the headers path for GCC?
rish
November 15, 2012
thanks

Thanks for your help.. It's very useful for me

Ads

 

Ads