首先必須先確定電腦有安裝cscope
安裝指令:
$ sudo apt-get install cscope
安裝完成後
僅需以下兩個指令
$ find . -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" -o -name "*.S" > cscope.files
$ cscope -q -R -b -i cscope.files
這兩個指令的意義分別是
1. 將所有要連結的檔案名稱蒐集到cscope.files裡
在這個例子我將所有副檔名是.c, .cpp, .h, .hpp, .S的檔案名稱都蒐集到cscope.files中了
2. 產生cscope的data base, 幾個參數代表的意義分別是:
-q Build an inverted index for quick symbol searching.
-R Recurse directories for files.
-b Build the cross-reference only.
-i namefile Browse through files listed in namefile, instead of cscope.files
|
|
|
|
|
|
|
|
|
Text-to-speech function is limited to 200 characters