Newbie Programming Question

Posted:
in Genius Bar edited January 2014
Hi. I am just starting out trying to do some Mac programming, and have a quick question. In order to learn Cocoa, all the books say you need to learn C first. So I got Pratical C from O'Reillys. Now which program do I use to write the examples in C, and how do I compile them under OSX. Thanks for any help.

Comments

  • Reply 1 of 5
    The best thing to do,even though it may seem strange,would be to learn C and Objective C side by side.The reason is that you will only learn the part of C that is necessary to use in Cocoa.Of course,if you want to know how to proagram the Classic enviroment,you would want to learn straight C,but Cocoa uses its own windowing behavoir,which is very easy to code,basically its done visually.C is part of Objective C,but it is used a somewhat differently in the context of Objective C.One book I highly recommend is Kernighan and Ritchie's the C programming language.
  • Reply 2 of 5
    To answer your question:



    There are a number of programs you can use to write and compile your own programs. My personal favorite is Metrowerk's Code Warrior. You can get a learn programming edition for pretty cheap. Around $50 I think. Also, they offer programming classes for free online.



    Good Luck!
  • Reply 3 of 5
    Thank you both for your replies. I am excited about the posssibilites of programming on the Mac, partly because of the great community of like minded folks who help in cases like this. Thanks again.
  • Reply 4 of 5
    jutusjutus Posts: 272member
    If you are starting C programming, and just building command line tools, you can use Project Builder in OS X. (recommended)



    You can also use any text editor, and use cc (equivalent to gcc) from the terminal to compile it.



    In this sense OS X is a much easier platform to get started programming in C on than OS 9.



    No need to shell out for Code Warrior if you are just starting out.
  • Reply 5 of 5
    cdhostagecdhostage Posts: 1,038member
    I'd spank both C and Objective C at the same time, then try to tackle actual programming in Cocoa.
Sign In or Register to comment.