[SOLVED] tr1/memory not found on Unit Testing target with Xcode 5

I want to use Catch for unit testing my project. I tried it with a simple command line app following this tutorial and works fine.

Next, I added it to my OF project, but when I try to compile the Test target I get the following error:

‘tr1/memory’ file not found.

on the include statement in ofTypes.h

The app target compiles just fine.

I don’t know where this error comes from. I’m not a pro developer and I’m not very familiar with build phases and settings, or compiler specificities. I tried adding the frameworks in the build phases of the Test target as they are on the app target but that didn’t solve the problem. The target membership of the source file (.cpp) of the class I’m testing is set to both the App target and the Test target.

I’m using OF 0.8.4 on OSX 10.8.5 with Xcode 5.1.1.

Any help will be very much appreciated.


This is probably something to do with C++11 settings for your unit testing target. See this github issue for a bit more info.

Try checking if the “C++ Language Dialect” and “C++ Standard Library” settings are the same between your app’s target and the unit test target.

That did it! Thank you sooo much!

C++ Language Dialiect must be set to Compiler Default
C++ Standard Library must be set to libstdc++ (GNU C++ standar library)


@hrodgair, you are absolutely right. Thanks.