PDA

View Full Version : Xcode won't let me build and run.




macuser1232
Mar 11, 2012, 03:32 PM
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.



szymczyk
Mar 12, 2012, 11:52 AM
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:

using command line and then I clicked on C++

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.

macuser1232
Mar 12, 2012, 06:30 PM
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.
I'm on xcode 3.2.6

----------

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.

szymczyk
Mar 13, 2012, 01:50 PM
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.

macuser1232
Mar 13, 2012, 07:02 PM
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.

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.

szymczyk
Mar 13, 2012, 08:04 PM
by restarting do you mean quitting the application and then starting it again and trying?
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 (https://lists.apple.com/mailman/listinfo/xcode-users). Some of Apple's Xcode engineers answer questions on the mailing list.

macuser1232
Mar 14, 2012, 05:02 PM
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 (https://lists.apple.com/mailman/listinfo/xcode-users). Some of Apple's Xcode engineers answer questions on the mailing list.

Ok I'm re-downloading it now.

macuser1232
Mar 14, 2012, 08:30 PM
YAY! Re-downloading Xcode fixed the problem! I can build and run now!
Thanks bro!