先要编译出来一个可执行文件,具体步骤:
1、cd到目录:~/app/src/main/cpp/command下面
2、输入命令:make,不报错的话这里应该会有一个可执行文件出来,如下图:

3、gdb pinyinime_dictbuilder就可以了。
前一阵弄过,后来忘了,记录一下,我这里报错了
../share/dictbuilder.cpp:22:25: fatal error: android/log.h: No such file or directory
compilation terminated.
../share/dicttrie.cpp:20:25: fatal error: android/log.h: No such file or directory
compilation terminated.
../share/spellingtrie.cpp:19:25: fatal error: android/log.h: No such file or directory
compilation terminated.
Makefile:27: recipe for target 'pinyinime_dictbuilder' failed
make: *** [pinyinime_dictbuilder] Error 1
找不到log.h头文件,删了就行了
________________________________________________GDB命令相关________________________________________
打印数组:p *spl_buf@20 (数组名字spl_buf)
数组长度:p *array@len

本文详细介绍了在~/app/src/main/cpp/command目录下,通过使用make命令编译生成可执行文件pinyinime_dictbuilder的过程。同时记录了解决编译过程中出现的找不到log.h头文件错误的方法,并提供了GDB中用于打印数组和获取数组长度的命令。
454

被折叠的 条评论
为什么被折叠?



