Centos 安装KScope1.6.2

准备工作:安装ctags graphviz,和cscope  (可以用yum install来安装)

1、首先下载kscope,最好下载16.x的版本,这个最好的

      下载kscope-1.6.2.tar.gz
2、解压

      下载后,解压缩,

       #tar -zxvf  kscope-1.6.2.tar.gz

     并进入到kscope-1.6.2的源码根目录中。

3、输入命令,进行配置

    sudo yum install kdelibs-devel  (configure: error: Can't find X libraries.)

    sudo yum install flex bison  ( configure: error: Lex/Flex is required in order to build KScope)

    # ./configure

checking for Qt... configure: error: Qt (>= Qt 3.3 and < 4.0) (headers and libraries) not found. Please check your installation!

输入命令查看有没QT

    rpm -qa qt

结果会有的,那么就就这样做,输入配置命令:

    ./configure --x-includes=/usr/include/X11/ --x-libraries=/usr/lib/ --with-qt-dir=/usr/lib/qt-3.3 --with-qt-includes=/usr/lib/qt-3.3/include/ --with-qt-inclues=/usr/lib/qt-3.3/lib/

即可成功,得到makefile 文件

4、编译:

    #make

     出错,提示:/usr/bin/ld: cannot find -lkateinterfaces

     解决办法:进入kscope-1.6.2目录下的src目录下,打开makefile,到482行左右,找到出错的语句

grep -n -lkateinterfaces Makefile

把-lkateinterfaces改成/usr/lib/libkatepartinterfaces.la。注意来“-”一并去掉。返回上级目录重新编译就可以了。

5、#make install

成功安装。

原文地址:https://www.cnblogs.com/pengdonglin137/p/3532523.html