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

Wolfgang

macrumors member
Original poster
Jun 12, 2006
56
0
I am new to programming and am taking a class in c++. Is there a way to simply create a single c++ file with xcode? how do you compile it? i tried the xcode help and that didnt really help too much. any help would be much appreciated. thank you
 

szymczyk

macrumors regular
Mar 5, 2006
187
17
Create a C++ Tool project. Choose Build > Build or click the Build button in the project window toolbar to build the project.
 

LtRammstein

macrumors 6502a
Jun 20, 2006
570
0
Denver, CO
I use the same thing Wolfgang. As a warning, since I do this to all my C++ projects, the compiler XCode uses for C++ GNU is not as good as using Visual Studios 2005. So when you see an error and it marks it, you will have to decypher the error message to the best of your ability. It gets frustrating at times. Also, when you add a .cpp file to the project, it will AUTOMATICALLY create a Header file (.h). I don't know what level of C++ coding you're in, but some projects you might do you can just delete the .h file since it is a small project. Also, if I remember correctly back when I first started C++ coding, you will do some projects with the GUI files in Visual Studios 2005. XCode uses something different. I will have to consult my friend on what he used, because at the time I had my ol' iBook.

Anyways, that should help if you get stuck on anything.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.