openframeworks/openFrameworks — pull request #2852 by pizthewiz (2014-03-13 20:43:55+00:00)
Title: fix tr1/memory compile issue on OS X 10.9

oF projects compiled with OS X 10.9 as the deployment target currently die on a tr1/memory error. The issue is that oF requires libstdc++ but the project files do not specify such, instead falling back to the compiler default - the default changed with 10.9 from libstdc++ (GNU C++ standard library) to libc++ (LLVM C++ standard library with C++11 support). See [PR #2764](https://github.com/openframeworks/openFrameworks/pull/2764) for more discussion on this issue.

The proposed change should be both backward and forward compatible and should not require any change in existing Xcode projects`*`. It defines the required C++ library in oF's Xcode configuration file which Project.xcconfig the Xcode configuration file for generated oF application directly inherits from. If and when oF moves to support libc++, the value added here to CoreOF.xcconfig should be changed as well. Obviously projects could hard-define the C++ library as well, but doing it at the CoreOF.xcconfig level, a project could defer the decision to the version of oF being built against.

Change tested by building [ofxCv](https://github.com/kylemcdonald/ofxCv/)/examples/example-face on OS X 10.9.3 with Xcode 5.1.

`*` Any project that has manually defined the C++ library to libstdc++ or set their deployment target to 10.8 (thusly changing the compiler default) to workaround this issue, may wish to remove the override and just allow the proposed CoreOF.xcconfig value instead for better forward compatibility.