Skip navigation

Another crack at C++

160 Views 5 Replies Latest reply: Dec 29, 2012 11:16 AM by johnfromgilroy RSS
johnfromgilroy Level 1 Level 1 (0 points)
Currently Being Moderated
Dec 28, 2012 11:31 PM

So far, I guess I don't know how to ask my question. Sorry. Is there a Unix guru out there that can clue me in on the Mac?


Here's my latest plea/responce:


None of the responses/experiences (so far) seems to apply to me. Let me ask the question this way, because it's partly for my education and also I'd like to program in C. Let's say I have a Unix box and I want to program in C. What files need to be where in what directories? And why wouldn't that work on a Mac? My impression is that the Mac OS X 10.8 contains all I need, but it doesn't work. At least I don't think it does. I may be out in left field here. But surely, being a Unix box, I can get this machine to compile C code in something like the usual fashion. I don't need editors or development environments beyond the basic stuff (I want to use vim) - unless your telling me maybe I do! Anyway, just wondering what files need to go where in order to compile C programs. Thanks for you forbearance. I appreciate it.


iMac, Mac OS X (10.7.1)
  • woodmeister50 Level 4 Level 4 (3,690 points)
    Currently Being Moderated
    Dec 29, 2012 3:53 AM (in response to johnfromgilroy)

    Actually the easiest and most complete approch would

    be to download and install the latest version of Xcode

    and then go into Xcode and install the optional command

    line tools.  


    After that, you no longer need to deal with Xcode and

    develop code any which way you want. 

    You will likely need to add INCLUDE paths

    either to your environment variables or as arguments

    on the command line.


    Note that the latest version of Xcode no longer uses the

    root /Developer directory and everything is encapsulated

    within the Xcode app.  Installing the command line tools

    will, among other things, install simlinks in the typical

    Unix locations to the elements that are located in Xcode App.

  • woodmeister50 Level 4 Level 4 (3,690 points)
    Currently Being Moderated
    Dec 29, 2012 10:37 AM (in response to johnfromgilroy)

    johnfromgilroy wrote:


    Ah! Now I that all makes sense! I downloaded the latest Xcode and all the tools the installation asked me to. Thanks a lot for explaining it. Don't have time to get into it right now, but I can't wait to try it out.



    Did that include the additional components found under

    the menu Xcode->Preferences...  and in downloads,



    update: BTW, did the hello program you had in another thread and

    it worked just fine for me. 


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.