I am trying to compile the openh264 project for android but facing some trouble.
I have setup the android_ndk-r10 properly and able to compile sample apps provided with the ndk.
Here's what i've done till now. Downloaded the zip of openh264 from here https://github.com/cisco/openh264.
Navigated to the openh264-openh264v1.1\codec\build\android\dec\jni path using the cmd prompt and then fired the ndk-build command.
It starts the build process but throws error while building libs for both encoder and decoder. Following is the error while building encoder lib....
[armeabi] Compile++ thumb: welsencdemo <= welsenc.cpp
[armeabi] Compile++ thumb: welsencdemo <= read_config.cpp
[armeabi] Compile++ thumb: welsencdemo <= myjni.cpp
[armeabi] Prebuilt : libstlport_shared.so <= /sources/cxx-stl/stlport
/libs/armeabi/thumb/
[armeabi] SharedLibrary : libwelsencdemo.so
D:/Softwares/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windo
ws-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-android
eabi/bin/ld.exe: D:/Work/Android/OpenH264/openh264-openh264v1.1/codec/build/andr
oid/enc//obj/local/armeabi/objs/welsencdemo/__/__/__/__/console/enc/src/welsenc.
o: in function CreateSVCEncHandle(ISVCEncoder**):D:/Work/Android/OpenH264/openh2
64-openh264v1.1/codec/build/android/enc//jni/../../../../console/enc/src/welsenc
.cpp:931: error: undefined reference to 'WelsCreateSVCEncoder'
D:/Softwares/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windo
ws-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-android
eabi/bin/ld.exe: D:/Work/Android/OpenH264/openh264-openh264v1.1/codec/build/andr
oid/enc//obj/local/armeabi/objs/welsencdemo/__/__/__/__/console/enc/src/welsenc.
o: in function DestroySVCEncHandle(ISVCEncoder*):D:/Work/Android/OpenH264/openh2
64-openh264v1.1/codec/build/android/enc//jni/../../../../console/enc/src/welsenc
.cpp:937: error: undefined reference to 'WelsDestroySVCEncoder'
collect2: ld returned 1 exit status
make.exe: *** [D:/Work/Android/OpenH264/openh264-openh264v1.1/codec/build/androi
d/enc//obj/local/armeabi/libwelsencdemo.so] Error 1
Similarly while building the decoder lib facing an error as below....
[armeabi] Compile++ thumb: welsdecdemo <= h264dec.cpp
[armeabi] Compile++ thumb: welsdecdemo <= read_config.cpp
[armeabi] Compile++ thumb: welsdecdemo <= d3d9_utils.cpp
[armeabi] Compile++ thumb: welsdecdemo <= myjni.cpp
[armeabi] Prebuilt : libstlport_shared.so <= /sources/cxx-stl/stlport
/libs/armeabi/thumb/
[armeabi] SharedLibrary : libwelsdecdemo.so
D:/Softwares/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windo
ws-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-android
eabi/bin/ld.exe: D:/Work/Android/OpenH264/openh264-openh264v1.1/codec/build/andr
oid/dec//obj/local/armeabi/objs/welsdecdemo/__/__/__/__/console/dec/src/h264dec.
o: in function DecMain(int, char**):D:/Work/Android/OpenH264/openh264-openh264v1
.1/codec/build/android/dec//jni/../../../../console/dec/src/h264dec.cpp:417: err
or: undefined reference to 'WelsCreateDecoder'
D:/Softwares/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windo
ws-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-android
eabi/bin/ld.exe: D:/Work/Android/OpenH264/openh264-openh264v1.1/codec/build/andr
oid/dec//obj/local/armeabi/objs/welsdecdemo/__/__/__/__/console/dec/src/h264dec.
o: in function DecMain(int, char**):D:/Work/Android/OpenH264/openh264-openh264v1
.1/codec/build/android/dec//jni/../../../../console/dec/src/h264dec.cpp:447: err
or: undefined reference to 'WelsDestroyDecoder'
collect2: ld returned 1 exit status
make.exe: *** [D:/Work/Android/OpenH264/openh264-openh264v1.1/codec/build/androi
d/dec//obj/local/armeabi/libwelsdecdemo.so] Error 1
Before trying to build I did not make any changes to the openh264 code that I downloaded. Its a linking error, I tried to fix by making changes to the welsdecdemo.mk file that refers to the .h and .cpp files that are available in the code, but still getting the same error. As am a java developer and new with NDK and cpp am facing a tough time.
Request your help, with some useful pointers in the right direction.