Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 11, 2012, 04:32 PM   #1
macuser1232
macrumors 6502a
 
Join Date: Jan 2012
Xcode won't let me build and run.

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.
macuser1232 is offline   0 Reply With Quote
Old Mar 12, 2012, 12:52 PM   #2
szymczyk
macrumors regular
 
Join Date: Mar 2006
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:

Quote:
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.
__________________
Mark Szymczyk
Author, Xcode Tools Sensei
http://www.meandmark.com
szymczyk is offline   0 Reply With Quote
Old Mar 12, 2012, 07:30 PM   #3
macuser1232
Thread Starter
macrumors 6502a
 
Join Date: Jan 2012
Quote:
Originally Posted by szymczyk View Post
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

----------

Quote:
Originally Posted by macuser1232 View Post
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.
macuser1232 is offline   0 Reply With Quote
Old Mar 13, 2012, 02:50 PM   #4
szymczyk
macrumors regular
 
Join Date: Mar 2006
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.
__________________
Mark Szymczyk
Author, Xcode Tools Sensei
http://www.meandmark.com
szymczyk is offline   0 Reply With Quote
Old Mar 13, 2012, 08:02 PM   #5
macuser1232
Thread Starter
macrumors 6502a
 
Join Date: Jan 2012
Quote:
Originally Posted by szymczyk View Post
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.
macuser1232 is offline   0 Reply With Quote
Old Mar 13, 2012, 09:04 PM   #6
szymczyk
macrumors regular
 
Join Date: Mar 2006
Quote:
Originally Posted by macuser1232 View Post
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. Some of Apple's Xcode engineers answer questions on the mailing list.
__________________
Mark Szymczyk
Author, Xcode Tools Sensei
http://www.meandmark.com
szymczyk is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Xcode build target jmfel1926 Mac Programming 1 Mar 2, 2014 03:26 PM
Xcode won't run my programs any more KarlJay iPhone/iPad Programming 6 Nov 14, 2013 01:43 PM
Program in Xcode won't run without net connection. impilot Mac Programming 4 Aug 28, 2012 04:47 PM
xcode build not possible, The timestamp service is not available. md11 Mac Programming 10 Jul 17, 2012 05:45 AM
Run executable from Xcode External Build System Project bogatyr Mac Programming 1 Jun 28, 2012 12:07 PM

Forum Jump

All times are GMT -5. The time now is 07:17 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC