New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Objective-C compiler not installed on this system


Post Reply New Thread Subscribe

 
Thread Tools
rlbrig

 
Member Since: Mar 31, 2011
Posts: 8
rlbrig is on a distinguished road

rlbrig is offline
When I try to compile code from the command line
(gcc -framework Foundation Prog1.m -o Prog1),
I receive the message that states Objective-c compiler is not installed. I installed the XCode from the Mac OS X cd, and upgraded to XCode 4.0.2.

I figure there is not a PATH set properly. Anyone have a clue?
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Ottawa
Posts: 17,099
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Installing the development tools (Xcode) will install GCC, the appropriate libraries and will create symlinks where necessary. Execute the following to see what it returns (it should return /usr/bin/gcc):
Code:
whereis gcc
If that returns nothing, try reinstalling Xcode. Someone else here had an issue recently similar to yours and reinstalling fixed it.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Mac-Forums Investigates MacKeeper - Confused about MacKeeper? Take a look at this review.
QUOTE Thanks
rlbrig

 
Member Since: Mar 31, 2011
Posts: 8
rlbrig is on a distinguished road

rlbrig is offline
When I enter "whereis gcc", it returns /usr/bin/gcc.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Ottawa
Posts: 17,099
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
You should have all the appropriate tools. I just did it here with a simple hello world app and it worked perfectly fine (I'm using GCC 4.2.1). Have you tried reinstalling the dev tools? Have you tried compiling this through Xcode? Others have noted that compiling through Xcode works when it doesn't work doing it "manually" (by hand at the CLI).

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Mac-Forums Investigates MacKeeper - Confused about MacKeeper? Take a look at this review.
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
Quote:
Originally Posted by rlbrig View Post
I installed the XCode from the Mac OS X cd, and upgraded to XCode 4.0.2.

I figure there is not a PATH set properly. Anyone have a clue?
Could be. If you did the install, and haven't logged out since then, that may be the trick. That PATH gets setup during login. Yes, you can set it manually.

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
QUOTE Thanks
rlbrig

 
Member Since: Mar 31, 2011
Posts: 8
rlbrig is on a distinguished road

rlbrig is offline
I reinstalled X Code 4.0.2. I can create a simple "Hello World" through X Code and it works. If I try to compile with a GCC command, I still get the message "Objective-C not installed. I have rebooted.
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,620
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
is /Developer/usr/bin/ in your path?

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
rlbrig

 
Member Since: Mar 31, 2011
Posts: 8
rlbrig is on a distinguished road

rlbrig is offline
Yup. Result of echo $PATH = /usr/local/gnat/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/X11/bin

Anybody have a path for a system that works?
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,620
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
well, here's mine. I don't see it as being hugely different.

Code:
mikeMbp:~ mike$ echo $PATH
/sw/bin:/sw/sbin:/Users/mike/scripts:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/ibm/dscli:/Developer/usr/bin/:/usr/X11R6/bin
mikeMbp:~ mike$

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
I've installed both 3.2 and 4.x of Xcode. Here is my path when in the tcsh and the whereis statement result for cc.


[mac:~] xstep% echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/mysql/bin

[mac:~] xstep% whereis cc
/usr/bin/cc

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
QUOTE Thanks
rlbrig

 
Member Since: Mar 31, 2011
Posts: 8
rlbrig is on a distinguished road

rlbrig is offline
Thanks to all who helped. The problem was in my path. Even though "whereis gcc" returned the correct gcc, "which gcc" follows the path and pointed to the gnat gcc. Once I corrected the path, it worked properly.
QUOTE Thanks

Post Reply New Thread Subscribe


« netbeans for powerpc | Objective-C help »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Four Mac OS X upgrades in three years... too much? Murlyn Apple Rumors and Reports 73 01-08-2014 02:18 PM
Mac OS X 10.7 Lion features new System Information app OneMoreThing... Apple Rumors and Reports 2 04-06-2011 04:20 PM
Getting "this software cannot be installed on this computer" error ChickieBell OS X - Operating System 13 06-05-2009 05:15 AM

All times are GMT -4. The time now is 08:02 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?