5 Replies Latest reply: Dec 29, 2012 11:16 AM by johnfromgilroy
johnfromgilroy Level 1 Level 1 (0 points)

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.

JohnfromG


iMac, Mac OS X (10.7.1)
  • woodmeister50 Level 4 Level 4 (3,975 points)

    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.

  • johnfromgilroy Level 1 Level 1 (0 points)

    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.

     

    jfromg

  • woodmeister50 Level 4 Level 4 (3,975 points)

    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.

     

    jfromg

    Did that include the additional components found under

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

    components?

     

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

    it worked just fine for me. 

  • johnfromgilroy Level 1 Level 1 (0 points)

    Okay. Doing all that stuff now. Many thanks! I'll let you know how it turns out.

  • johnfromgilroy Level 1 Level 1 (0 points)

    Okay! Works! Hello World! Thank you community people! I feel so much better now.

     

    j