How do I program in C in OS X?

Discussion in 'Mac Programming' started by Spanky Deluxe, Oct 23, 2006.

  1. Spanky Deluxe macrumors 601

    Spanky Deluxe

    Joined:
    Mar 17, 2005
    Location:
    London, UK
    #1
    Forgive me for being stupid but how do I write simple command line programs in C in OS X? I think I can write programs in the text edit program and then compile them with 'make' but I'm sure there must be a simple program or way to use XCode so as to debug and spot errors. Something on the lines of the Salford C compiler in Windows.

    Any help would be greatly appreciated!!
     
  2. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #2
    I find Xcode is overkill for small stuff. A text editor + gcc + gdb is what I use; However, Xcode can handle C programs just fine. You just create a project of the right type (command line tool, iirc).
     
  3. Spanky Deluxe thread starter macrumors 601

    Spanky Deluxe

    Joined:
    Mar 17, 2005
    Location:
    London, UK
    #3
    I just worked it out. You have to create a "Standard Tool" under the application type "Command Line Utility". I'm just starting a project full of equations and fitting algorythms and stuff. The kind of things where mistakes are easily made, so some level of debugging tools would be of great help. I'll give Xcode a try and see if it can do everything I want without being overcomplicated. :)

    Thanks! :)
     

Share This Page