I am unable to cross compile the source using Android toolchain.
Getting below error
help if you can give me some Android.mk file which will be easier.
tools/drammer$ /local/mnt/workspace2/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++
-I/local/mnt/workspace2/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include
--sysroot=/local/mnt/workspace2/android-ndk-r13b/platforms/android-24/arch-arm
-std=c++11 -O3 -Wall -I/local/mnt/workspace2/tools/drammer/../include
-c -o rh-test.o rh-test.cc
In file included from rh-test.cc:34:0:
helper.h: In function 'uintptr_t get_phys_addr(uintptr_t)':
helper.h:80:90: warning: format '%p' expects argument of type 'void*',
but argument 2 has type 'uintptr_t {aka unsigned int}' [-Wformat=]
printf("page not present? virtual address: %p | value: %p\n",
virtual_addr, value);
^
helper.h:80:90: warning: format '%p' expects argument of type 'void*',
but argument 3 has type 'uint64_t {aka long long unsigned int}'
[-Wformat=]
helper.h: In function 'uint64_t
compute_median(std::__ndk1::vector<long long unsigned int>&)':
helper.h:89:10: error: invalid use of incomplete type 'class
std::__ndk1::vector<long long unsigned int>'
if (v.size() == 0) return 0;
^
In file included from
/local/mnt/workspace2/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/iterator:343:0,
from
/local/mnt/workspace2/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/memory:606,
from
/local/mnt/workspace2/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/algorithm:634,
from rh-test.cc:17:
/local/mnt/workspace2/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/iosfwd:200:29:
error: declaration of 'class std::__ndk1::vector<long long unsigned
int>'
class _LIBCPP_TYPE_VIS_ONLY vector;
^
In file included from rh-test.cc:34:0:
helper.h:90:27: error: variable 'std::__ndk1::vector<long long
unsigned int> tmp' has initializer but incomplete type
std::vector<uint64_t> tmp = v;
^