# Xcode 8 std library compiler default

**URL:** <https://forum.juce.com/t/xcode-8-std-library-compiler-default/20590>\
**Category:** General JUCE discussion\
**Created:** [January 13, 2017, 4:24pm UTC](https://forum.juce.com/t/xcode-8-std-library-compiler-default/20590 "2017-01-13T16:24:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [January 13, 2017, 4:24pm UTC](https://forum.juce.com/t/xcode-8-std-library-compiler-default/20590/1 "2017-01-13T16:24:03Z")

</div>

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_

1. 

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

1. 

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?

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [January 13, 2017, 11:02pm UTC](https://forum.juce.com/t/xcode-8-std-library-compiler-default/20590/2 "2017-01-13T23:02:48Z")

</div>

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

Rail

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [January 14, 2017, 10:28am UTC](https://forum.juce.com/t/xcode-8-std-library-compiler-default/20590/3 "2017-01-14T10:28:24Z")

</div>

Thanks Rail,

i always get an error when i use std::unique\_pointer and a Deployment Target \< 10.9

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [January 14, 2017, 10:50am UTC](https://forum.juce.com/t/xcode-8-std-library-compiler-default/20590/4 "2017-01-14T10:50:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [January 14, 2017, 11:37am UTC](https://forum.juce.com/t/xcode-8-std-library-compiler-default/20590/5 "2017-01-14T11:37:57Z")

</div>

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++ ?
