So, you’ve installed Xcode 4.6, and you are a C++ programmer.
You want to use the latest and greatest, so you create a new project, and add your sources to the project, and hit Build, and … guess what? Your code doesn’t build!
What’s up with that?
In Xcode 4.6 (and presumably, later versions), the default C++ compiler is clang, the default language is C++11, and the standard library is libc++.
This is a change from previous versions, where the default was gcc 4.2.1, C++03, and libstdc++.
This is good news
Clang is a much more capable compiler than gcc 4.2.1. It’s also better integrated into Xcode.
C++11 is a major upgrade in functionality from C++03. There have been lots of articles written about the new features, so I won’t belabor them here.
However, with a new language, compiler, and standard library, there are some incompatibilities. I’ll try to…
View original post 501 more words