Ubuntu 编程环境搭建

One,

apt-get install build-essential

 

http://hi.baidu.com/mrprogrammer/blog/item/294b512b17efb993023bf62f.html


Two,

1.
in synaptic install the cscope
2.
the dirctory of the project
# cscope -Rbkq
# vim file.c
then:
cs add cscope.out
...


http://dslab.lzu.edu.cn:8080/members/zhangwei/doc/cscope-HOWTO.txt
3.2 Build the database for cscope

3.2.1 the simpest method

>> cscope -Rbkq

[ -R makes Cscope parse all subdirectories, not just the current directory
  -b which tells Cscope to just build the database, then exit, otherwise,
     it will enter into the cscope comand line.
  -q causes an additional, 'inverted index' file to be created,
     which makes searches run much faster for large databases.
  -k sets Cscope's 'kernel' mode--it will not look in /usr/include for any
     header files that are #included in your source files]

3.2.2 the complex method

we can select what we want to add to the database for cscope, it is supported
with the option -i or the default file cscope.files.
in this method, we can exclude the files not useful, or include the files we
have interst on.
so we can use the command "find" to list the files you have interest on of
your
 project with the absolute path, just like this:


>> cd /
>> find /my/project/dir -name '*.java' >/my/cscope/dir/cscope.files

[by default Cscope only parses files with the .c, .h, .y, or .l extensions, so
we need to add these files have .java extensions to the cscope.files or other
files u want if u use the -i option instead]

After create a file including the "interest" files list with their absolute
paths, we can use the following command to generate the database cscope.out.

>> cscope -bkq // R?

3.2.3 Update the cscope database

if u have change some files in your project, u can use the "-U" option with
the
first method, and with the second method, u can update the file list in the
file
cscope.files or the filename u defined yourself with the "find" command. and

then
execute "cscope -bkq" command.






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值