I just started to get my hands dirty with C/C++, and I am still getting my head around the different concepts (I've written mostly Java previously). I'd really like to know which C/C++ compiler is used and also which standard library is included. Also, I'd like to know where I can find the API documentation of the respective standard library (like the Java SE API docs).
Xcode uses two different compilers: one for Swift and the other for Objective-C, Objective-C++ and C/C++ files. clang is Apple's official compiler for the C languages family. It is open-sourced here: swift-clang. swiftc is a Swift compiler executable which is used by Xcode to compile and run Swift source code.
This document outlines the process of installing Xcode on Mac OS, which provides a compiler for C source code. Two approaches are described: the first illustrates how to write, compile and execute C programs in the Mac OS Terminal window using the command prompt tools.
The compiler that we recommend is the GNU Compiler collection or GCC. This is a widely used cross-platform compiler toolsuite that has libraries and compilers for C, C++, Fortran, Java, and more. Additionally the compiler that we will use later on in the course for compiling C code to run on the PIC32 is based on GCC.
Conclusion. Though there are many compilers available for C, GCC stands out to be one of the best as of now. The winner declaration here lies based on durability, optimization, speed, and code/error/syntax checks.
For C++:
Xcode 4.6.2 uses the Clang C++ compiler frontend with LLVM as backend which is conform to the C++11 standart and uses libc++ as the standart library.
Here you can finde a apple presentation about libc++.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With