Xcode won't let me build and run.

Discussion in 'Mac Programming' started by macuser1232, Mar 11, 2012.

  1. macrumors 6502a

    macuser1232

    Joined:
    Jan 20, 2012
    #1
    Hey guys so I just started a new project on xcode using command line and then I clicked on C++. When I go to source files and then go to main.cpp it doesn't let me click on the build and run button at the top.
     
  2. macrumors regular

    Joined:
    Mar 5, 2006
    #2
    You need to provide some more information for people to be able to help you. What version of Xcode are you using? Your mention of the Build and Run button tells me you're not using Xcode 4.

    When you say the following:

    Do you mean you created a C++ command-line tool project?

    Are you able to build and run the project from Xcode's menus? Xcode 2 and 3 have a Build menu that has a Build and Run menu item.

    If you click the link in my signature, you can find two articles that walk you through the creation of a C++ command-line application project in Xcode. One article covers Xcode 4 and the other covers earlier versions of Xcode.
     
  3. thread starter macrumors 6502a

    macuser1232

    Joined:
    Jan 20, 2012
    #3
    I'm on xcode 3.2.6

    ----------

    if i just start a new project and don't edit the default coding at all it still won't let me build and run the project.
     
  4. macrumors regular

    Joined:
    Mar 5, 2006
    #4
    If you create a different type of project, such as a Cocoa application, are the menu items in the Build menu enabled so you can build the project? Have you tried restarting Xcode? Something could have been messed up that a restart would fix.
     
  5. thread starter macrumors 6502a

    macuser1232

    Joined:
    Jan 20, 2012
    #5
    I tried creating a different type of project and it still didn't let me build and run. Also by restarting do you mean quitting the application and then starting it again and trying? Because, I have already done that several times.
     
  6. macrumors regular

    Joined:
    Mar 5, 2006
    #6
    Yes.

    The only suggestion I can give is to uninstall Xcode and reinstall it. Instructions on how to uninstall Xcode are in the About Xcode and iOS SDK document that comes with Xcode. If uninstalling and reinstalling doesn't work, ask on Apple's Xcode mailing list. Some of Apple's Xcode engineers answer questions on the mailing list.
     
  7. thread starter macrumors 6502a

    macuser1232

    Joined:
    Jan 20, 2012
    #7
    Ok I'm re-downloading it now.
     
  8. thread starter macrumors 6502a

    macuser1232

    Joined:
    Jan 20, 2012
    #8
    YAY! Re-downloading Xcode fixed the problem! I can build and run now!
    Thanks bro!
     

Share This Page