Share on Google+Share on Google+

Objective C on Mac

Advertisement
I this section we will show you how to compile and run Objective C program on Mac machine.

Objective C on Mac

     

I this section we will show you how to compile and run Objective C program on Mac machine.

Compiling Objective C on Mac OS x

To Compile Objective-C Programs on Mac OS X

This is a simple process to compile and run the code. Follow the steps given below:
1. Set path to the directory where hello.m saved and compile with the following command

 

 



$ gcc -o hello hello.m \ -L /System/Library/Frameworks/Foundation.framework/Foundation

Here -L option is used to locate the library files used in the code.

2. To run the code use the command..

$ ./hello

3. Output will be.....

2008-01-26 23:10:32.983 hello[381:10b] hello world!

 

Advertisements

Advertisement

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

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Comments:1
Sushreesmita
September 2, 2011
comment

many faults are present in the website,especially spelling mistakes...make corrections.