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

- 5,082
- 15
- 55
- 86
I'm not an XCode user, but it seems to be Apple's LLVM Compiler (by default) according to Apple's website: https://developer.apple.com/technologies/tools/. But, I guess, like any other IDE XCode does support other compilers like GCC. Also depends on your XCode version it seems: http://useyourloaf.com/blog/2011/03/21/compiler-options-in-xcode-gcc-or-llvm.html
Here's a question in SO that asks about the default compiler and the answer seems to have the code to find just that: In Xcode 4.5, what is "Compiler Default" for "C++ Standard Library" and "C++ Language Dialect"?
According to this post 4.6 uses clang instead of GCC for C++: http://cplusplusmusings.wordpress.com/2013/02/26/c-and-xcode-4-6/
P.S.: Googling does help ;)

- 1
- 1

- 6,575
- 3
- 30
- 48
-
5"Googling does help", funny enough this question is now the second highest search result on Google for "what compiler does XCode use". – jrh Jan 16 '19 at 23:42
-
Top result for me on DuckDuckGo... The student has become the master. – chaosTechnician Feb 04 '22 at 00:12
I just noticed the second half of the question was never really answered:
... I'd like to know where I can find the API documentation of the respective standard library ...
A simple Google search will reveal a wealth of information about this. Do note, however, that the "C++ Standard Library" is not the same thing as the "C Standard Library," so be careful of that when searching and reading. C++ has its roots in C, but the two have diverged to become separate languages that share a lot of commonality -- and a lot of hidden differences.
The canonical reference work regarding this is titled, appropriately enough, "The C++ Standard Library" by Nicolai M. Josuttis, published by Addison-Wesley. Many C++ programmers keep this on their bookshelves as a reference.
There is a good online reference for the library at https://cppreference.com/.
If you are interested in specifics of the LLVM implementation used by Apple's Xcode, see https://libcxx.llvm.org/ .
For a comprehensive list of the most highly recommended books and references for C++, Stack Overflow already has a very good FAQ regarding this: The Definitive C++ Book Guide and List.

- 123
- 8