Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What versions of gcc, llvm and clang are in XCode 4?

For some reason, this information is difficult to come by.

We'd like to start using some of the C++0x features that are available in most compilers. But we are held back a bit by XCode 3, since it only provides GCC 4.2 and LLVM 1.5. All of the other platforms we need to support either already have compilers with preliminary support for C++0x features, or they have a relatively painless method of installing/upgrading the compiler.

An XCode 4 preview is available, but only to those in the Mac or iOS Developer Program.

like image 288
leedm777 Avatar asked Dec 08 '10 18:12

leedm777


3 Answers

Xcode 4 GM

gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
Apple clang version 2.0 (tags/Apple/clang-134) (based on LLVM 2.9svn)
like image 74
Trung Lê Avatar answered Oct 02 '22 23:10

Trung Lê


You can use a later gcc version in Xcode 3. I did it once, however I don't fully remember how; I used a gcc I built myself from the svn trunk. There is post here which might help you.

like image 41
lucas clemente Avatar answered Oct 02 '22 23:10

lucas clemente


You can also build and run later versions of clang within Xcode. See for example:

http://shapeof.com/archives/2010/01/using_the_latest_llvm_with_xcode.html

like image 37
Jean-Denis Muys Avatar answered Oct 02 '22 23:10

Jean-Denis Muys