View Full Version : C++ Compiling In Xcode
Wolfgang
Nov 6, 2006, 09:22 PM
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
Catfish_Man
Nov 6, 2006, 09:48 PM
Xcode is oriented around projects, not files, which is why I use a text editor + gcc for small stuff.
szymczyk
Nov 7, 2006, 01:38 PM
Create a C++ Tool project. Choose Build > Build or click the Build button in the project window toolbar to build the project.
LtRammstein
Nov 7, 2006, 03:38 PM
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.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.