Android NDK gives this error make Error 2 -


im trying build android ndk , gives me error. im using eclipse. im using android-ndk-r12. , android ndk preference in eclipse c:\android-ndk-r12 (i have tried "c:\android-ndk-r12\build" , did not work). , android android.mk below:

local_path := $(call my-dir)  include $(clear_vars)  local_module    := com_example_ndktest_store local_src_files := com_example_ndktest_store.cpp  include $(build_shared_library) 

the error below:

[armeabi-v7a] "compile++ arm  ": "com_example_ndktesting_store <= com_example_ndktesting_store.cpp" process_begin: createprocess(null, c:/android-ndk-r12/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -mmd -mp -mf ./obj/local/armeabi-v7a/objs/com_example_ndktesting_store/com_example_ndktesting_store.o.d -gcc-toolchain c:/android-ndk-r12/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -wno-invalid-command-line-argument -wno-unused-command-line-argument -no-canonical-prefixes -fno-integrated-as -g -target armv7-none-linux-androideabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -marm -o2 -dndebug -ic:/android-ndk-r12/build//../sources/cxx-stl/gnu-libstdc++/4.9/include -ic:/android-ndk-r12/build//../sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -ic:/android-ndk-r12/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/backward -ijni -dandroid -mfpu=vfp -mfloat-abi=softfp -fno-short-enums -werror -dandroid -ddisable_importgl -isystem /usr/include/ -wa,--noexecstack -wformat -werror=format-security -std=gnu++0x -frtti -fexceptions -dandroid -isystem c:/android-ndk-r12/build//../platforms/android-24/arch-arm/usr/include -c jni/com_example_ndktesting_store.cpp -o ./obj/local/armeabi-v7a/objs/com_example_ndktesting_store/com_example_ndktesting_store.o, ...) failed. make (e=2): system cannot find file specified. make: *** [obj/local/armeabi-v7a/objs/com_example_ndktesting_store/com_example_ndktesting_store.o] error 2 

1- make sure have right version of ndk : if use 32bit windows, should download , install android-ndk-r12-windows-x86.zip , if use 64bit windows, should download , install android-ndk-r12-windows-x86_64.zip

2- define proper toolchain: sure clang++.exe found in specified path , dose ndk version has toolchain? try set ndk_toolchain_version (example ndk_toolchain_version := clang3.3) in android.mk file proper toolchain found in ndk-r12. android developers documentation:

ndk_toolchain_version define variable either 4.9 or 4.8 select version of gcc compiler. version 4.9 default 64-bit abis, , 4.8 default 32-bit abis. select version of clang, define variable clang3.4, clang3.5, or clang. specifying clang chooses recent version of clang. 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -