Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bravens52

macrumors regular
Original poster
Jul 16, 2009
110
0
Hey I'm taking a c++ class in colleg right Noe and I downloaded Xcode and I finished my assignment but Xcode won't let me build or compile my program. The options are there but aren't selectable? Does anybody know why? I have 10.6.2 if that helps.

Also is there any other c++ programs besides Xcode for mac??
 
Xcode is not likely the problem.

Did you create an Xcode project and add your source files into it so it can manage the build cycle? If so which project template did you choose as your starting point?
 
No I just selected open new file because I use dev on windows in class and we don't have to hit new project. I'll try hitting new project
 
im basically just trying to create a blank document..im not looking to make apps for iphone or mac ..just usage for class..im a little confused because i just bought this mac and i am use to quincy and dev and i have never used xcode before
 
Fox Xcode to compile your file, it needs to be part of a project. When you open Xcode, you can create a new project. "Command line" is probably a good choice.
 
Yeah, I think most IDEs require you to create a project before you start dumping code into it. So for you, I think you'd choose File->New Project, then select "Command Line Utility" on the left, and then "C++ Tool" on the right. Then replace the template code of main.cpp with your own.
 
i went ot the command tool under new project but it only shows main.c and not c++
 
When you created the project, you should have clicked the "Type" dropdown and chosen "C++ stdc++". Good luck.
 
i went ot the command tool under new project but it only shows main.c and not c++

When you select the command line utility option from the left, it lets you choose from several different icons on the right. It sounds like you selected "Standard tool" when you should have selected "C++ Tool".

Do you not have the "C++ Tool" option in your XCode?

P.S. I only have the 10.5 version so maybe it's presented a little differently on yours.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.