vim插件cscope安装

参考网上的“将vim打造成集成IDE环境”的文章,做到安装cscope时,需要安装这个插件。在下载安装过程中遇到些问题,现在记下作为总结。

1.下载。在www.sourceforge.net搜索cscope,然后下载tar包

2.解压安装。cd到tar包存放的目录,执行tar -xzvf cscope-XXX.tar.gz ,进入解压出的目录。执行./configure ; make 

3.这个时候可能会遇到问题:没有curses.h这个文件或目录。(以前练习过c语言里面引用curses.h的编程,但是系统重装了以后就没碰过了)这个时候可以执行:sudo apt-get install libncurses5-dev

4.继续,make clean;make。这个时候应该出现下面的问题:

WARNING: `flex' is missing on your system.  You should only need it if
         you modified a `.l' file.  You may need the `Flex' package
         in order for those modifications to take effect.  You can get
         `Flex' from any GNU archive site.
make[1]: *** [fscanner.c] 错误 1

这个问题,只要按照WARNING提示中的去做,sudo apt-get install flex就可以了

5.再继续,make clean ; make   这个时候再出现:../ylwrap: 行 112: yacc: 未找到命令
make[2]: *** [egrep.c] 错误 1

解决这个问题需要下面的命令:sudo apt-get install byacc(想直接装yacc的,会提示没有这个软件包)

6.再继续,接下来就没什么问题了。

版权声明:本文为博主原创文章,未经博主允许不得转载。

原文地址:https://www.cnblogs.com/gxwang/p/4940877.html