Programming Software on OS X disc?

Discussion in 'macOS' started by scan, Nov 28, 2005.

  1. scan macrumors 6502

    Joined:
    Oct 24, 2005
    #1
    I heard from someone that there is programming software on the OS X disc. I need something to compile C code. What am I looking for?
     
  2. maxvamp macrumors 6502a

    maxvamp

    Joined:
    Sep 26, 2002
    Location:
    Somewhere out there
    #2
    Install XCode

    You'll find GCC that will be able to compile your code for you.

    Without more about what you are trying to do, I can't help you any further.

    Max.
     
  3. scan thread starter macrumors 6502

    Joined:
    Oct 24, 2005
    #3
    thats all I want to do. is compile C Code. i have a program that is written in C and I want to test it out. Question is: How?

     
  4. stridey macrumors 65816

    stridey

    Joined:
    Jan 21, 2005
    Location:
    Massachusetts, Connecticut
    #4
    in Terminal, run "cc" on the file.
     
  5. scan thread starter macrumors 6502

    Joined:
    Oct 24, 2005
    #5

    tried that already
     
  6. scan thread starter macrumors 6502

    Joined:
    Oct 24, 2005
    #6
    do i have to install the Xcode.mpkg on my OS X Cd?
     
  7. scan thread starter macrumors 6502

    Joined:
    Oct 24, 2005
    #7

    just tried it again. says: cc command not found
     
  8. caveman_uk Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #8
    Yes...or download the latest version from the apple developer site.
     
  9. satans_banjo macrumors regular

    Joined:
    Sep 12, 2005
    Location:
    SE London
    #9
    use this:

    1. save your file
    2. open terminal
    3. cd into the directory your file is in
    4. type the following into terminal, replacing <filename> with your filename:

    gcc <filename>.c -o <filename>

    or for C++ files:

    g++ <filename>.cpp -o <filename>

    the bit after the -o is the name the compilation will be named
     
  10. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #10
    GCC won't work unless you've installed Xcode already, or a separate version of GCC. Just use the Xcode install that comes with your OS X CDs.
     
  11. scan thread starter macrumors 6502

    Joined:
    Oct 24, 2005
    #11

    I did that and everthing works perfectly. I'm loving OS X more and more everyday. would never find any compilers on Windows
     

Share This Page