我下載的是kscope-1.6.2.tar.gz
Fedora 14安裝kscope的步驟
我下載的是kscope-1.6.2.tar.gz
http://download.chinaunix.net/download/0006000/5469.shtml
[root@localhost kscope-1.6.2]# tar zxvf kscope-1.6.2.tar.gz
[root@localhost kscope-1.6.2]# cd kscope-1.6.2
[root@localhost kscope-1.6.2]# ./configure
configure: error: The important program kde-config was not found!
[root@localhost kscope-1.6.2]# yum install kdelibs3 kdelibs3-devel
[root@localhost kscope-1.6.2]# ./configure
checking for Qt... configure: error: Qt (>= Qt 3.3 and < 4.0) (headers and libraries) not found. Please check your installation!
For more details about this problem, look at the end of config.log.
[root@localhost kscope-1.6.2]# yum install qt3 qt3-devel
[root@localhost kscope-1.6.2]# source /etc/profile
[root@localhost kscope-1.6.2]# ./configure
configure: error: Lex/Flex is required in order to build KScope
[root@localhost kscope-1.6.2]# yum install -y flex
[root@localhost kscope-1.6.2]# ./configure
configure: error: Yacc/Bison is required in order to build KScope
[root@localhost kscope-1.6.2]# yum install -y bison
[root@localhost kscope-1.6.2]# ./configure
Good - your configure finished. Start make now
[root@localhost kscope-1.6.2]# make
/usr/bin/ld: cannot find -lkateinterfaces
make時提示找不到 -lkateinterfaces,該參數是要找動態連結程式庫,其實沒有動態連結程式庫,只有靜態連結庫,該庫位於/usr/lib/libkatepartinterfaces.la
[root@localhost kscope-1.6.2]# vi src/Makefile
修改src/Makefile 大約在482行
kscope_LDADD = -lkateinterfaces -lktexteditor $(LIB_KDEUI)
-lkateinterfaces 替換為/usr/lib/libkatepartinterfaces.la
[root@localhost kscope-1.6.2]# make
[root@localhost kscope-1.6.2]# make install
[root@localhost kscope-1.6.2]# make clean
[root@localhost sourcenav-6.0]# yum install -y cscope ctags graphviz
[root@localhost sourcenav-6.0]# kscope
第一次啟動時,需要對Kscope做一些簡單的配置,在配置時可能要指定Kscope所需的cscope,ctags和dot,直接點擊下面的按鈕Guess,讓它自己檢測就可以了,或者按下面這樣子設定。
Cscope path:/usr/bin/cscope
Ctags path:/usr/bin/ctags
Dot path:/usr/bin/dot
中文是亂碼
Tools--->Encoding--->選擇相應中文編碼。如gb2312
kscope的使用:
1、游標移到某個函數上,必須ctrl+1才能跳到函數定義處,而不會自動跳轉。
2、將游標停在某個函數名上,按Ctrl + \。根據提示,點兩下滑鼠,就可以輕鬆得到函數調用的關係圖
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
參考資料:http://blog.csdn.net/fontlose/article/details/6403019
原始碼閱讀工具cscope+taglist+Ctags kscope