如何使用cscope对于具有.C,的.cpp和.h文件的项目? [英] How to use cscope for a project which has .c , .cpp and .h files?

查看:257
本文介绍了如何使用cscope对于具有.C,的.cpp和.h文件的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作需要 LLVM编译器源 - code的理解的一个项目。要浏览LLVM​​源$ C ​​$ C,我试图使用cscope与源的根目录下面的命令:

I am working on a project which requires the understanding of llvm compiler source-code. To browse source code of llvm, I tried to use cscope with following command in the root directory of the source:

cscope的-R *

cscope -R *

但它不工作。由于有主要的.cpp和.h文件,但一些.c文件也存在。所以现在我没有线索如何使cscope的工作?是否有人可以帮助?

But it doesn't work. As there are mainly .cpp and .h files but some .c files are also there. So now I don't have a clue how to make cscope work? Can someone please help?

推荐答案

您可以使用下面的命令从LLVM源代码树的根目录下执行所需的任务:

You can use following commands to do the required task from the root directory of llvm source tree:

touch tags.lst
find | grep "\.c$" >> tags.lst
find | grep "\.cpp$" >> tags.lst
find | grep "\.h$" >> tags.lst
cscope -i tags.lst

这将创建一个用于与cscope的浏览code cscope.out中的文件。希望它能帮助!

It would create cscope.out file which is used with cscope to browse the code. Hope it helps!

这篇关于如何使用cscope对于具有.C,的.cpp和.h文件的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆