Xcode 8 std library compiler default


#1

Can it be that the compiler default c++ library for
MACOSX_DEPLOYMENT_TARGET=10.7 is libstdc++
and it changes automatically if you choose MACOSX_DEPLOYMENT_TARGET=10.9 to libc++?

Edit: I think not
Edit2: or maybe yes

After i upgraded to xcode 8 i always get the error

libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9

Is there a way to use new c++ features like std::unique_pointer with MACOSX_DEPLOYMENT_TARGET=10.7 and is it compatible with the AAX SDK?


#2
  1. If you compile the AAX Library with the same C++ Lib as your plugin… yes

Rail


#3

Thanks Rail,

i always get an error when i use std::unique_pointer and a Deployment Target < 10.9


#4

Yeah, the general rule is that you’re OK using C++11 language features in older versions, but not library features.


#5

thanks, i just found out

  • if you choose C++ Standard library "Compiler Default"
    you can’t use std::unique_ptr when Deployment Target < 10.9

  • if you choose C++ Standard library "libc++"
    you can’t use std::unique_ptr when Deployment Target < 10.7

  • if you choose C++ Standard library "libstdc++"
    you can’t use std::unique_ptr anyway

So my initial assumption was right ?!

libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9

But why the XCode compiler recommended to go to deployment target OX 10.9, when also 10.7 supports new c++ library features, and why the “Compiler Default” library of target <10.9 does not support new c++ library features

Maybe there should be a hint in Projucer,
if Deployment Target >= 10.7 && Deployment Target <=10.8
to activate “libc++” as StandardLibrary, if you want to use (some?) new C++ library features.

So whats your recommendation, for Deployment Target >= 10.7, choose libc++ ?