good c compiler

Discussion in 'Mac Programming' started by stone315, Jul 18, 2008.

  1. stone315 macrumors regular

    Joined:
    Jun 17, 2008
    #1
    hi, i'm a newbie programmer, i'm going into college in the fall and the introductory course is in java. however, i want some programming experience before i go in, so i decided to teach myself c. i bought kernighan and ritchie, and i was wondering if anyone could recommend a good c compiler for a mac for me. thanks!
     
  2. bartelby macrumors Core

    Joined:
    Jun 16, 2004
    #2
    There's GCC included in XCode that comes with your mac.
     
  3. stone315 thread starter macrumors regular

    Joined:
    Jun 17, 2008
  4. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #5
    gcc is the most widespread C compiler, and you'll be able to transfer your knowledge to many other platforms and architectures.

    Now is not the time for XCode or other IDEs. Learn to use gcc, gdb, and other tools independently first.

    -Lee
     
  5. stone315 thread starter macrumors regular

    Joined:
    Jun 17, 2008
    #6
    ok thanks. is there any difference between gcc for windows and for mac? like if i type the exact same thing on each one, i'll get the same result, right? i'm just asking cause my macbook hasn't come in yet, so i'm running off my home pc until it does. i was going to use my girlfriend's macbook while she's in italy, but i don't want to download stuff to her computer.

    EDIT: alright, i've been running vista for 4 days now and i want to throw this goddamn hp out my window. it's not a mac, so i can't use fetch as an ftp, so i'm trying to use filezilla. i downloaded the setup file, and now i'm trying to install it on my computer, but for every individual file in the setup program i get an error message that says "error opening file for writing". any ideas on how to fix this, or for another free ftp?
     
  6. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #7
    For ftp on Windows, use the Cygwin command line.

    Or Windows Powershell, which sucks compared to Cygwin, but tends to impress Windows users who are used to the vestigial command line support offered by command.exe.
     
  7. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #8
    Sounds like you need to be running in an administrator account.
     
  8. SawTooth500 macrumors member

    Joined:
    Nov 9, 2007
    Location:
    Florence, Arizona
    #9
    From what I have heard about Windows Vista, you should probably dump it and go back to what ever flavor of windows you were using before. And try to get your money back for the crummy programming codes that is called Vista.:apple:


    In windows try Visual C or Visual C++.
     
  9. stone315 thread starter macrumors regular

    Joined:
    Jun 17, 2008
    #10
    thanks guys, i got into an administrator account and got filezilla running. now i just need to learn how to actually use gcc, but i'll worry about that in the morning.
     
  10. OS X Dude macrumors 6502a

    OS X Dude

    Joined:
    Jun 30, 2007
    Location:
    UK
    #11
    is it a GUI compiler, like you press a button and it does it, or is it command-line driven?
     
  11. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #12
    Both. Just the same as the compiler supplied with Xcode.
     
  12. OS X Dude macrumors 6502a

    OS X Dude

    Joined:
    Jun 30, 2007
    Location:
    UK
    #13
    cool thanks :) I installed GCC from the Xcode Tools on the Leopard DVD and it took 90.5MB of space, but it doesn't appear as an app - like i can't launch it. I deleted it and installed it again, same thing. I didn't install any Xcode stuff just gcc.pkg.


    Thanks
     
  13. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #14
    You need to install the whole package if you want to use the GUI part called Xcode. GCC is just a command line compiler. Xcode is an IDE built to use it.
     
  14. OS X Dude macrumors 6502a

    OS X Dude

    Joined:
    Jun 30, 2007
    Location:
    UK
    #15
    Gosh darn it :( ah well learning C anyway so i guess i should just install it and be done.... bye bye 5GB of space :(


    thanks
     
  15. stone315 thread starter macrumors regular

    Joined:
    Jun 17, 2008
    #16
    so is xcode easier to use than gcc for a newbie since it's gui instead of command line driven? i'm assuming yes.
     
  16. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #17
    No, Xcode adds a whole lot more complexity. Use the command line while you are learning then progress to Xcode once you know what you are doing.
     
  17. OS X Dude macrumors 6502a

    OS X Dude

    Joined:
    Jun 30, 2007
    Location:
    UK
    #18
    OK I installed Xcode from the Leopard DVD, now if I download the iPhone SDK does it replace my version of Xcode + Interface Builder with the latest versions of those apps?
     
  18. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #19
    Yes, but if you are not planning on doing any iPhone development then I would just download the latest version of Xcode. Best to uninstall the one on the Leopard DVD first though. There is a readme document which explains how, just trashing the Developer folder is not enough.
     
  19. OS X Dude macrumors 6502a

    OS X Dude

    Joined:
    Jun 30, 2007
    Location:
    UK
    #20
    I'd try and avoid downloading Xcode, as it's a pretty big file for my 512kbps connection to handle :( I may do though if I get really into this programming lark though.

    What type of template do I choose from the list to make a C app? Just use a C++ template and just write C?

    Thanks, you are officially A Great Help :)
     
  20. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #21
    Well the iPhone SDK is the larger than the standard Xcode download so there you do :).

    As for template choose the Standard Tool template in the Command Line Utilities section.
     
  21. OS X Dude macrumors 6502a

    OS X Dude

    Joined:
    Jun 30, 2007
    Location:
    UK
    #22
    Thanks, I'll play about with my current Xcode learning C, and then Objective-C. Then I'll upgrade my Xcode version.


    Thanks a lot :)
     

Share This Page