XCode - Build and Go Button - Inactive

Discussion in 'Mac Programming' started by TejasMehrotra, Dec 14, 2009.

  1. TejasMehrotra macrumors newbie

    Joined:
    Dec 14, 2009
    #1
    Hi,

    I am new to programming on Mac. I installed XCode 3.1.3 and was trying to write a C++ program 'Hello World' but I was unable to compile the program.

    I wrote the program but the 'Build and Go' button is inactive. What am I suppose to do to activate the button or what am I suppose to do to compile a c++ program?

    Enclosed: Pictures which might help you to understand my problem better.

    [​IMG]

    [​IMG]

    [​IMG]

    Thanks a lot! :)

    Tejas.
     
  2. SRossi macrumors regular

    Joined:
    May 27, 2009
    Location:
    Glasgow, Scotland
    #2
    Did you create a new project or just a new file?

    Because in Xcode you must create a project for it run. Just create a new project by going File -> New Project and selecting C++ command line application.

    This will create all the files needed for Xcode to run the app.

    Stephen
     
  3. TejasMehrotra thread starter macrumors newbie

    Joined:
    Dec 14, 2009
    #3
    Thanks!

    Thanks a lot Stephan. I really appreciate your help.

    It worked! :)

    Although, it said "Succeeded" but now the problem is that where do I see the output from?

    Sorry to bug you with my super duper "rookie" questions.

    Thanks a lot! :)

    Tejas.
     
  4. SRossi macrumors regular

    Joined:
    May 27, 2009
    Location:
    Glasgow, Scotland
    #4
    To solve this you need to open Xcode's preferences by going Xcode -> Preferences, then navigate to "Debugging" and next to "On Start" use the drop down box to select "Show Console". Apply the changes and build and run your app again.

    And no question is a rookie question, everyone starts somewhere.

    Stephen
     
  5. TejasMehrotra thread starter macrumors newbie

    Joined:
    Dec 14, 2009
  6. Detrius macrumors 68000

    Joined:
    Sep 10, 2008
    Location:
    Asheville, NC
    #6
    That doesn't make it not a rookie question. It does, however, mean that it's not a stupid question. :cool:
     
  7. TaylorGSmith, Feb 21, 2012
    Last edited: Feb 21, 2012

    TaylorGSmith macrumors newbie

    Joined:
    Feb 21, 2012
    #7
    So I'm having the exact same problem and I don't have the "C++ command line application" option... What am I to do? Went through:

    File -> New project
    Framework & Library -> "STL C++ Library"

    "Run/Build" is inactive...
    There are no errors, there is a check mark next to it indicating what I assume is that it is error-free...

    I'm at my wit's end. In Eclipse, I merely have to save to run my program, but it seems Xcode requires more protocol. What am I to do?

    PS - I'm running Xcode 3.2.6
     
  8. ScoobyMcDoo macrumors 65816

    Joined:
    Nov 26, 2007
    Location:
    Austin, TX
    #8
    Don't choose Framework and Library, instead choose Applications.
     

Share This Page