今天下午本身写了一个很简单的工程文件,用到ndk-build android
期间报错,如今将报错和解决方法贴出来 ui
第一个错误: spa
/home/ss/android-ndk-r8d/build/gmsl/__gmsl:512: *** non-numeric second argument to `wordlist' function: ''. Stop. code
解决方法: input
修改build/gmsl/__gmsl文件的 第512行 io
int_encode = $(__gmsl_tr1)$(wordlist 1,$1,$(__gmsl_input_int)) 改成 function
int_encode = $(__gmsl_tr1)$(wordlist 1,$(words $1),$(__gmsl_input_int))
方法
第二个错误: error
error: undefined reference to '__android_log_print' top
解决方法:
1.出现这种问题,查看一下你的.c文件里面添加 #include "android/log.h"
2.查看你的Android.mk文件中添加 LOCAL_LDLIBS := -llog