Simple C++ In Xcode

Discussion in 'Mac Programming' started by HansSH, Jan 17, 2008.

  1. HansSH macrumors newbie

    Joined:
    Jan 17, 2008
    #1
    Hi. I'm trying to start using C++, and I'm running a Macbook Pro, with 10.5.1, and Xcode version 3.0. I've done simple C++ before, and I just want to know how to get into a workspace which I can create, and build as I want. Right now, I just want to make a program that "cout"s a phrase. How can I open a workspace and an editing file, which I can finish, and compile in Xcode?

    Thanks!
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  3. HansSH thread starter macrumors newbie

    Joined:
    Jan 17, 2008
    #3
    Those instructions are for Xcode 2.3, right? In 3.0, there's nothing called "C++ Tool." It gives me "Carbon C++ Application" and "Carbon C++ Standard Application." What's the difference?
     
  4. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    It is there, it's under the "Command Line Utility" section. Shows up for me in Xcode 3.0
     
  5. HansSH thread starter macrumors newbie

    Joined:
    Jan 17, 2008
    #5
    gotcha, gotcha. i'll give it a try. thanks! :)
     
  6. HansSH thread starter macrumors newbie

    Joined:
    Jan 17, 2008
    #6
    Another Problem

    I've now made the code that I wish to compile, build, and execute. So, naturally, I clicked "Build and Go." However, to my dismay, nothing happens. No Terminal program is opened. No DOS-like window is opened, such as on Visual C++. How would I be able to accomplish this?
     
  7. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  8. clh macrumors newbie

    Joined:
    Feb 17, 2008
    #8
    xcode 3.0

    Hi,
    I am using Xcode 3.0, when I try to create a new project, the Assistant does not show anything under Command line utility. I would like to create a fortran project, and cannot find Standard tool under "Command line utility", Why???
    Thank you.
    C.
     
  9. neonblue2 macrumors 6502a

    Joined:
    Aug 25, 2006
    Location:
    Port Pirie, South Australia
    #9
    "Build and Go" doesn't open external apps which in this case you need the Terminal to open. When you go to build it, just hit "Build" and double click the UNIX executable file in the Xcode window.

    And I don't know what resources you have but have you checked out this place? I've been looking at it for the last few days and I think it's perfect.
     
  10. twgil macrumors newbie

    Joined:
    Mar 1, 2008
    #10
    I had that same idea to start with C++ in Xcode. It's WAY easier to learn cocoa (objective C) than to try and get C++ to work with Aqua programs. If you're just using command line tools C++ will be easy enough.
     
  11. guardian85 macrumors newbie

    Joined:
    Feb 29, 2008
    #11
    also the short cut command to get the console is: shift + command +r

    its quicker than going to run -> console

    im one of those people who don't like to take their hands off the keyboard
     

Share This Page