VS2015: http_client.h(41,9): fatal error : 'memory' file not found

Jan 2, 2015 at 2:02 AM
I am trying to create a portable static library in VS 2015 and I added (NuGet) cpprestsdk.android 2.4.0 to the Android project and cpprestsdk 2.4.0 to the Windows Phone 8.1 project. When I build I get an error on the Android project:

packages\cpprestsdk.android.2.4.0\build\native\include\cpprest\http_client.h(41,9): fatal error : 'memory' file not found
1> #include <memory>
1> ^
1> Assertion failed: getDeclContext()->getRedeclContext()->isTranslationUnit(), file /s/ndk-toolchain/src/llvm-3.4/llvm/tools/clang/lib/AST/Decl.cpp, line 2338

Is there anything that need to be set to make it work?

Jan 2, 2015 at 8:35 PM
Hi Pedro,

Have you followed all the instructions here on how to use with Android? Specifically you need to set the use of STL to gnustl_static and the C++ language to C++ 11.

Marked as answer by MsdnDev on 1/2/2015 at 1:12 PM
Jan 2, 2015 at 9:12 PM
Hi Steve,
I missed the instructions. It now works.

Jan 2, 2015 at 9:14 PM
Great glad to hear. Probably next week I'm going to put together a blog post walking through how to use with Android.