Hello,
This happens because gradle plugin looks for c++_shared in the folder $NDK/sources/cxx-stl/llvm-libc++ (where it is in Google's Android NDK), but in CrystaX NDK it resides in $NDK/sources/cxx-stl/llvm-libc++/$LLVM_VERSION.
You can fix it either by manually copying content of $NDK/sources/cxx-stl/llvm-libc++/3.7/ folder to the $NDK/sources/cxx-stl/llvm-libc++ (quick and dirty fix) or by specifying all paths to C++ headers and libraries manually in your gradle script - the same as it's done for Boost libraries in https://github.com/crystax/android-samples-android-studio/blob/master/app/build.gradle.
Something like this:
-- Dmitry Moskalchuk
--
You received this message because you are subscribed to the Google Groups "crystax-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crystax-ndk...@googlegroups.com.
To post to this group, send email to cryst...@googlegroups.com.
Visit this group at https://groups.google.com/group/crystax-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/crystax-ndk/2a1494d1-a491-4e3d-a683-2f3ee708cd33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
It seems like you haven't included <cstddef> before that header.
The fact that code compiles with Google's Android NDK should not confuse - main goal of CrystaX NDK is conformance to standards, thus many things are just more strict than in Google's NDK. For example, using Google's NDK, you may implicitly include <cstddef> by including other header, but in CrystaX NDK it's not included implicitly so it has to be included explicitly.
However, I can't say for sure what's wrong without having specific code. All above is just an assumption. It would be good if you could provide some minimal example, where this error is reproduced.
-- Dmitry Moskalchuk
--
You received this message because you are subscribed to the Google Groups "crystax-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crystax-ndk...@googlegroups.com.
To post to this group, send email to cryst...@googlegroups.com.
Visit this group at https://groups.google.com/group/crystax-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/crystax-ndk/c664a40e-13c0-4c01-9f42-8753f77a0b8b%40googlegroups.com.
Yes, gradle plugin doesn't handle several versions of LLVM libc++. It just looks in hard-coded path.
It seems that we are forced to keep the same structure for
one (default) LLVM libc++ version, just to make Android Studio
and Visual Studio happy, even though it looks ugly. So yes, in
the next release LLVM libc++ layout will be fixed in order to
reflect that.
-- Dmitry Moskalchuk
To view this discussion on the web visit https://groups.google.com/d/msgid/crystax-ndk/68025d48-2e52-4d92-9509-0a96cd52e6f0%40googlegroups.com.
ndk {
stl "gnustl_shared"
...
stl "c++_shared"
"ld: error: cannot find -lc++_shared"
cd /home/declan/Documents/zone/mid/bin/android/crystax/crystax-ndk-10.3.2_dec9/sources/cxx-stl/llvm-libc++
ln -s ./3.8/libs ./libs # solves "ld: error: cannot find -lc++_shared"
#include <vector>
ln -s ./3.8/libcxx/include ./include # does -NOT- solve "fatal error: 'vector' file not found #include <vector>"