Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I finished building the GCC 4.7.2 with C, C++ and Go compilers on my Ubuntu 12.04. I now want to add the Objective C compiler, is it possible to add it to the previous build? If so, how should i proceed?

Thanks.

share|improve this question
add comment

1 Answer

Install the GNU Objective-C Runtime using sudo apt-get install gobjc and compile your objective c code using gcc -o <filename> <filename>.m -Wall -lobjc, -Wall and -o are optional. The key argument is -lobjc. Then use ./<filename> to launch exec

share|improve this answer
    
Thanks Harish, but the 'apt-get' is pulling the 'gobjc-4.6' package while i would like to have the latest package, should i add a ppa? Also will building gcc again on the current build but this time after including Objective C sort the problem? –  Ballistic Dec 18 '12 at 14:31
    
add sudo add-apt-repository ppa:ubuntu-toolchain-r/test and run sudo apt-get update and install gobjc4.7.Thanks –  harish.venkat Dec 18 '12 at 18:29
    
i will try this, but is it possible to add to the existing build using the 'gcc' source which i already have? –  Ballistic Dec 19 '12 at 5:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.