Configuring Xcode for C++

Discussion in 'Mac Programming' started by nothvice, Jul 8, 2009.

  1. nothvice macrumors newbie

    Jul 8, 2009
    Hello. I am currently learning C++ and need to now how to configure Xcode to run very simple C++ programs. I'm not doing any GUI stuff right now, just command line stuff. I have tried to configure it myself, but every time I create a new project it adds all these extra files that I assume is for GUI stuff. When it adds all the extra files, I can't get my simple programs to work.

  2. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    new project
    Command line utility
    ->C++ tool

    should do it.

  3. jinksys macrumors newbie


    Dec 16, 2008
    Saint Louis, Mo
    If you are developing a program that doesn't have a gui, it might be helpful to go into preferences->debugging and set "On Start:" to "Show Console."
  4. larkost macrumors 6502a

    Oct 13, 2007
    What template are you using? If you choose the command line tool for C++ then it will give you what you need. I only have the seeding version in front of me, so I can't give you the exact name of the template you need, but it is there.
  5. nothvice thread starter macrumors newbie

    Jul 8, 2009
    Thanks for all the tips! I'm where I need to be. BTW, I was using the Carbon C++ template before.

    A quick question though. Is there a way to define custom code snippets? I have a comment header that needs to be in the top of each of my programs, but the ones Xcode has built-in are exactly what I need.


Share This Page