| OS X - Development and Darwin Discussion and questions about development for Mac OS X. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Mar 31, 2011
Posts: 8
![]() |
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 | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,302
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
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 Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,302
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
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 :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
![]() Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
|
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 | |
![]() Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,527
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff
|
mike This machine kills fascists Got # ? phear the command line! |
| QUOTE Thanks | |
![]() Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,527
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff
|
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 | |
![]() Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
|
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 | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| 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 |
| Four Mac OS X upgrades in three years... too much? | Murlyn | Apple Rumors and Reports | 64 | 06-09-2005 10:31 PM |
All times are GMT -4. The time now is 09:50 AM.
Powered by vBulletin