2

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.

2

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

3
  • 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 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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