Perraco
Perraco

Reputation: 17380

how to allow using make_shared in android ndk

Finally I was able to use shared_ptr in Elcipse/NDK by adding:

#include <tr1/shared_ptr.h>

But I can't find the way to also use make_shared

Any suggestions?

thanks

Upvotes: 0

Views: 513

Answers (1)

Alex Cohn
Alex Cohn

Reputation: 57183

For make_shared, you need to choose one of these APP_STL in Application.mk:

gnustl_static   -> Use the GNU STL as a static library.
gnustl_shared   -> Use the GNU STL as a shared library.
c++_static      -> Use the LLVM libc++ as a static library.
c++_shared      -> Use the LLVM libc++ as a shared library.

See NDK CPLUSPLUS-SUPPORT doc for more details.

Upvotes: 1

Related Questions