10.8 Deployment Target + StringArray initialization issue?

Hey jucers,

I am attempting to target OS X 10.8 as my deployment target, with a base SDK of 10.10. I do have the xcode 10.7 - 10.10 SDKs.


When I save and build the project, I get an unusual error regarding "no matching constructor" for StringArrays.


They're declared in this style:

StringArray foo = {

Thoughts? Seems unusual. This is the correct way to declare a StringArray, right? I've never had an issue prior to this.


Thanks so much,

You're actually using a C++11 technique there: initialiser lists. Unfortunately although the compiler will happily build it, the 10.8 runtime doesn't contain the C++11 std library functions that it relies on, so you can't use it.

But you can use C++11 and deploy to 10.8, see Timur's post on how deployment setting interferes with standard compiler setting: http://www.juce.com/comment/318838#comment-318838

Just set it explicit to the language you want and the library setting.

We use c++ 11 and deploy to 10.7.  10.7 is the first sdk to support c++ 11.

I'm going to cross-thread-quote timur here (hopefully nothing locks):

 If you set it to 10.8, then the default is not C++11 anymore, and you'd have to set C++11 and libc++ manually (after which everything compiles happily).


That was it! It's compiling now, and all the initalization errors have fallen away.


Thanks jucers!