Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which C/C++ compiler does Xcode use?

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).

like image 569
wowpatrick Avatar asked May 22 '13 17:05

wowpatrick


People also ask

What C compiler does XCode use?

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.

Does XCode have C compiler?

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.

What compiler should I use for C?

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.

Is GCC the best C compiler?

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.


1 Answers

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++.

like image 97
wowpatrick Avatar answered Sep 30 '22 18:09

wowpatrick