LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to compile Objective-C? (https://www.linuxquestions.org/questions/programming-9/how-to-compile-objective-c-779129/)

MTK358 12-31-2009 02:57 PM

How to compile Objective-C?
 
I decided to try Objective-C for fun but can't figure out how to get GCC to compile it. This is what happens:

Code:

tutorial$ gcc -o hello hello.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory

By the way, I don't understand what GNUstep is. Could you explain that to me?

ofaring 12-31-2009 04:06 PM

I'm not a developer, but perhaps I can help you aim for the right direction.

From the Slackware FTP server:
Quote:

gcc-objc: gcc-objc (Objective-C support for GCC)
gcc-objc:
gcc-objc: Objective-C support for the GNU Compiler Collection.
gcc-objc:
gcc-objc: This package contains those parts of the compiler collection needed to
gcc-objc: compile code written in Objective-C. Objective-C was originally
gcc-objc: developed to add object-oriented extensions to the C language, and is
gcc-objc: best known as the native language of the NeXT computer.
gcc-objc:
gcc-objc: The base gcc package is also required.
gcc-objc:
So, my question is, do you only have a base install of GCC (C and possibly C++)? Without knowing more info - such as, are you actually running Fedora 12 - it's impossible for anyone to give you more of an answer. Since I don't personally run Fedora, I have a minimal understanding of their package tools. Presumably, you need to install the missing add-ons for GCC in your installation of Fedora.

And finally, have you read what the GNUstep site has to say? No one else is going to say it better.

Good luck.

MTK358 12-31-2009 04:50 PM

Of course I have GCC installed, I compile C programs just fine. I am running Fedora 12.

And I tried running "gcc-objc" and it said command not found.

MTK358 12-31-2009 07:36 PM

I found out about "Portable Object Compiler":

http://users.telenet.be/stes/compiler.html

It works and does not need GNUstep.


All times are GMT -5. The time now is 07:01 AM.