CMake Error at CMakeLists.txt:106 (add_library):
Cannot find source file:
build/generated-src/cpp/pocketsphinx_wrap.c
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: pocketsphinx_jni
local.properties paths for ndk.dir and sdk.dir are set correctly.
I use the build.gradle script which comes with the pocketsphinx-android from the github repository.
I installed the latest SWIG (3.0.12) and get the same error when manually typing in the swig-command in cmd as following:
I created the output directories manually because the task mkdir didn't work.
I have not worked with swig or jni before, but I was hoping that AndroidStudio would do the work for me.
Unfortunately, using the prebuilt Pocketsphinx-Android-Demo library is not an option for me.
Could anyone give me advise on how to get this building process working?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thank you for you help.
I installed the newest version of gradle(4.0.2) and running the build in cmd was successful.
After that, building via AndroidStudio also works.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have problems with creating pocketsphinx-android-5prealpha-debug.aar
I followed the steps in https://cmusphinx.github.io/wiki/tutorialandroid/#building-pocketsphinx-android, but when gradle build process is running I get the following output:
CMake Error at CMakeLists.txt:106 (add_library):
Cannot find source file:
build/generated-src/cpp/pocketsphinx_wrap.c
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: pocketsphinx_jni
local.properties paths for ndk.dir and sdk.dir are set correctly.
I use the build.gradle script which comes with the pocketsphinx-android from the github repository.
I installed the latest SWIG (3.0.12) and get the same error when manually typing in the swig-command in cmd as following:
swig -I../sphinxbase/include -I../sphinxbase/swig -java -package edu.cmu.pocketsphinx -outdir build/generated-src/java -o build/generated-src/cpp/sphinxbase_wrap.c ../sphinxbase/swig/sphinxbase.i
swig -I../sphinxbase/swig -I../pocketsphinx/include -I../pocketsphinx/swig -java -package edu.cmu.pocketsphinx -outdir build/generated-src/java -o build/generated-src/cpp/pocketsphinx_wrap.c ../pocketsphinx/swig/pocketsphinx.i
I created the output directories manually because the task mkdir didn't work.
I have not worked with swig or jni before, but I was hoping that AndroidStudio would do the work for me.
Unfortunately, using the prebuilt Pocketsphinx-Android-Demo library is not an option for me.
Could anyone give me advise on how to get this building process working?
Run
gradle clean && gradle -i build >& build.log
and share build.log
Hi Nickolay,
thank you for you help.
I installed the newest version of gradle(4.0.2) and running the build in cmd was successful.
After that, building via AndroidStudio also works.