xcode command line c++ issues

Discussion in 'Mac Programming' started by dvince2, Dec 30, 2008.

  1. dvince2 macrumors 6502

    dvince2

    Joined:
    Mar 6, 2007
    Location:
    Canada
    #1
    Hey everyone
    I've been trying to find an answer to this both here and through google, but i've had no luck.
    I'm teaching myself C++, and am writing some basic (hello world, add to numbers, guess the number, etc) programs. I want to learn xcode's IDE (I've been using eclipse for java and C development (as well as emacs :) ).

    My issue is, I don't see a way to run the program through xcode. I know that in eclipse, there is an interactive terminal at the bottom of the window. I don't see anything like this in xcode.

    Is there an interactive terminal in xcode? Or do i have to use the actual terminal to compile and run the code I'm writing?

    Thanks,
    dvince2
     
  2. szymczyk macrumors regular

    Joined:
    Mar 5, 2006
    #2
    In Xcode 3 you have to open the debugger console to enter input and see the output of command-line programs. Choose Run > Console to open the console. Choose Build > Build and Run to run your program.
     
  3. dvince2 thread starter macrumors 6502

    dvince2

    Joined:
    Mar 6, 2007
    Location:
    Canada
  4. justmyself macrumors member

    Joined:
    Jan 2, 2009
    #4
    File > New Project > Command Line Utility > C++ Tool

    That should do it. Just write your app in the main.cpp. Build and Go will open the console.

    Hope that helps.
     

Share This Page