LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-31-2009, 03:57 PM   #1
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
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?
 
Old 12-31-2009, 05:06 PM   #2
ofaring
Member
 
Registered: Feb 2006
Location: Ontario, Canada
Distribution: Debian, sometimes BSD.
Posts: 44
Blog Entries: 13

Rep: Reputation: 21
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.
 
Old 12-31-2009, 05:50 PM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
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.
 
Old 12-31-2009, 08:36 PM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
I found out about "Portable Object Compiler":

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

It works and does not need GNUstep.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Objective-C Newbie MexDeath Programming 11 08-15-2009 12:48 AM
Is is possible to program Wxwidgets with Objective C? chutsu Programming 1 03-29-2008 01:36 PM
LXer: Don't Forget The 'C' in Objective-C LXer Syndicated Linux News 0 05-26-2007 02:16 PM
Objective-C dogn00dles Programming 2 11-29-2003 03:30 AM
using gnu c compiler to compile objective c schatoor Linux - Software 1 10-20-2003 12:06 PM


All times are GMT -5. The time now is 07:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration