How to detect g ++ or clang ++ in xcode 4?
How do I use a C ++ compiler (g ++ or clang ++) to compile a simple C ++ project in xCode 4?
You can assume I'm in a project, in build settings. I have build options -> Compiler for C / C ++ / Objective-C -> Apple LLVM compiler 3.0 and LLVM GCC 4.2 as parameters.
Is this ok or do I need to install another one?
How to do it?
source to share
To run simple code with Xcode, after starting Xcode, select Create New Xcode Project. (You can also go to "File | New | New Project ..." or press Shift-⌘-N). This will display a screen on this screen, select "Application" then select "Command Line Tool" and then click "Next". Now enter a name for your project and select C ++ type and click Next on the next screen, select a directory for the project and click create now you can write codes in the main.cpp file in the left pane to run your code, just click the "Run" button.
Update:
In the build settings, click "Build Settings" and then click "All" under the C ++ Interface Language and C ++ Standard Library tab, you can choose which compiler and C ++ standard you want to include C ++ eleven.
source to share