I’m sure this may be answered elsewhere but I couldn’t find it.
If you want to use C++11 features in your application and support OSX down to 10.7 you need to…
- Set ‘OSX Deployment Target’ to ‘10.7’
- Set ‘C++ Library’ to ‘LLVM libc++’
…in the Config>Xcode>Debug/Release Projucer settings.
“Apple provides a C++11 standard library in libc++. They also ship a very old version of libstdc++ that has no C++11 support. The compiler driver defaults to libstdc++ when the deployment target is lower than 10.9, so by setting the deployment target to 10.7, you’ve inadvertently instructed the compiler driver to disable the C++11 library.”
By only setting the ‘OSX Deployment Target’, the minimum that will build C++11 features is 10.9.
Hopefully this may help someone else!