opencore-amr-android
opencore-amr-android copied to clipboard
Does not compile NDK r10e
Error is
C:\Users\Admin\Desktop\opencore-amr-android-master\opencore-amr-android-master\Codec\amr\src\main>ndk-build
make.exe: *** No rule to make target `jni/opencore/../jni/opencore/../amr_encoder.cpp', needed by `obj/local/arm64-v8a/objs/amr-codec/jni/opencore/__/amr_encoder.o'. Stop.
try mac?
I don't have access to Mac at the moment. Do you know why doesn't compile on Windows?
i think the problem lies in include path in android.mk file, but i am not sure.
You can try these steps -
- Use NDK android-ndk-r11c
- Change Android.mk -
...................
LOCAL_SRC_FILES := amr_encoder.cpp \
amr_decoder.cpp \
wrapper.cpp
.....................
N.B.: I guess NDK r10e is capable of compiling if you try step 2, skipping step 1.
Failed with
` C:\Users\Admin\Desktop\opencore-amr-android-master\Codec\amr\src\main\jni>ndk-build
[arm64-v8a] "Compile++ ": "amr-codec <= amr_encoder.cpp" process_begin: CreateProcess(NULL, C:/AndroidDev/AndroidNDK/build//../toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/bin/aarch64-linux-android-g++ -MMD -MP -MF C:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/obj/local/arm64-v8a/objs/amr-codec/amr_encoder.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-exceptions -fno-rtti -O2 -g -DNDEBUG -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -IC:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/jni/oscl -IC:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include -IC:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src -IC:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/include -IC:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/src -IC:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/include -IC:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src -IC:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/jni/opencore/codecs_v2/audio/gsm_amr/common/dec/include -IC:/AndroidDev/AndroidNDK/build//../sources/cxx-stl/system/include -IC:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/jni/opencore/.. -DANDROID -Wa,--noexecstack -Wformat -Werror=format-security -isystem C:/AndroidDev/AndroidNDK/build//../platforms/android-21/arch-arm64/usr/include -c C:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/jni/opencore/../amr_encoder.cpp -o C:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/obj/local/arm64-v8a/objs/amr-codec/amr_encoder.o, ...) failed. make (e=2): The system cannot find the file specified. make: *** [C:/Users/Admin/Desktop/opencore-amr-android-master/Codec/amr/src/main/obj/local/arm64-v8a/objs/amr-codec/amr_encoder.o] Error 2
C:\Users\Admin\Desktop\opencore-amr-android-master\Codec\amr\src\main\jni> `
My first response was with eclipse by adding the codes inside jni folder and thats why I had to do some changes in Android.mk.
Anyway, to make similar environment as yours, I have downloaded the fresh code again. I have tried your way and without changing a single word anywhere in the code I was able to compile it using Windows 10 64.
- I didnt add any path variable, also I dont have cygwin as well.
- I used ndk-build all
Sample command: D:\Users\rajib\Desktop\opencore-amr-android-master\Codec\amr\src\main\jni>D:\DevTools\android-ndk-r10d\ndk-build all
I hope, you can try using ndk-build all and also can check if any other environmental variable is playing this unwanted role.
I get same issue with ndk-build all
Just to clarify,
- I have other projects and they build fine
- I have downloaded the source an have not modified it in any way
- I have tried with android-ndk-r10d and android-ndk-r11c
Ok, it compiles on Linux. Why would that be then? I have no idea about c or ndk but it looks like some path parameter is not compatible with windows