Andreas Falkenhahn
2018-03-25 15:53:04 UTC
I'm trying to compile some C++11 code with the clang that came with NDK r14b. I'm not using Android Studio, Gradle, or CMake but just plain makefiles.
I invoke clang like this:
C:/Users/foo/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe --target=aarch64-none-linux-android --gcc-toolchain=C:/Users/foo/AppData/Local/Android/sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64 --sysroot=C:/Users/foo/AppData/Local/Android/sdk/ndk-bundle/platforms/android-21/arch-arm64 -c -Wall -DANDROID -DNDEBUG -std=c++11 -O2 test.cpp
Note that I have set -std=c++11 so C++11 should work fine. Instead, the compiler errors after the very first line...
#include <vector>
...saying that it cannot find file "vector". What am I doing wrong?
--
Best regards,
Andreas Falkenhahn mailto:***@falkenhahn.com
I invoke clang like this:
C:/Users/foo/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe --target=aarch64-none-linux-android --gcc-toolchain=C:/Users/foo/AppData/Local/Android/sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64 --sysroot=C:/Users/foo/AppData/Local/Android/sdk/ndk-bundle/platforms/android-21/arch-arm64 -c -Wall -DANDROID -DNDEBUG -std=c++11 -O2 test.cpp
Note that I have set -std=c++11 so C++11 should work fine. Instead, the compiler errors after the very first line...
#include <vector>
...saying that it cannot find file "vector". What am I doing wrong?
--
Best regards,
Andreas Falkenhahn mailto:***@falkenhahn.com
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1998855825.20180325175304%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1998855825.20180325175304%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.