I recently using CMU-Sphinx for Android. When I try to build the sample project from the websites, I got the following error:
“Compile thumb : pocketsphinx_jni <= pocketsphinx_wrap.c
C:/CMUSphhinx/PocketSphinxAndroidDemo//jni/pocketsphinx_wrap.c: In function ‘nbest_s_hyp’:
C:/CMUSphhinx/PocketSphinxAndroidDemo//jni/pocketsphinx_wrap.c:793:6: warning: return makes pointer from integer without a cast [enabled by default]
C:/CMUSphhinx/PocketSphinxAndroidDemo//jni/pocketsphinx_wrap.c: In function ‘ps_decoder_s_getHyp’:
C:/CMUSphhinx/PocketSphinxAndroidDemo//jni/pocketsphinx_wrap.c:847:3: warning: return makes pointer from integer without a cast [enabled by default]
SharedLibrary : libpocketsphinx_jni.soC:/CMUSphhinx/PocketSphinxAndroidDemo//obj/local/armeabi/objs/pocketsphinx_jni/pocketsphinx_wrap.o: In function
nbest_s_hyp':new_Hypothesis’
C:/CMUSphhinx/PocketSphinxAndroidDemo//jni/pocketsphinx_wrap.c:793: undefined reference to
C:/CMUSphhinx/PocketSphinxAndroidDemo//obj/local/armeabi/objs/pocketsphinx_jni/pocketsphinx_wrap.o: In functionps_decoder_s_getHyp':new_Hypothesis’
C:/CMUSphhinx/PocketSphinxAndroidDemo//jni/pocketsphinx_wrap.c:847: undefined reference to
collect2: ld returned 1 exit status
make: * [C:/CMUSphhinx/PocketSphinxAndroidDemo//obj/local/armeabi/libpocketsphinx_jni.so] Error 1
I am using Windows with these tools:
eclipse Indigo.
android 2.2 sdk
android ndkbuild-r8b
swigwin-2.0.8
and this is my configuration on my eclipse:
SWIG:
Main: C:\swigwin-2.0.8\swig.exe
NDK-build:
Main:
C:\android-ndk-r8b\ndk-build.cmd
Try swig 1.3. There could be issues with 2.0. Check full build log for details.