use full path when building cscope.files, for example:
find /home/you/projects/project -name '*.cpp' -o -name "*.h" > ./cscope.files
find后面的路径要写成绝对路径,要不然在子路径下打开文件,然后跳转的时候,使用cscope就会出现找不到文件的问题(相对路径造成的)find ~/work/myProject/ -name "*.h" -o -name "*.c" -o -name "*.cc" -name "*.cpp" > cscope.files
cscope -bkq -i cscope.files
也可以使用,
find ~/myproject –type f > cscope.files将所有的放入cscope.files中