Emacs、Cedet 和语义
我已经按照Alex文章为emacs配置了CEDET(太棒了!! )。 现在,问题是:
- 我已经在
/usr/include
中使用 Gnu Global 生成了 GTAGS,如何检查语义是否正在使用 GTAGS? - 我可以将 GTAGS 保存在另一个目录中并指示语义使用该目录吗?
- 在 C/C++ 源代码中,包含语句的完成(来自系统 headers) 未列出所有可用的标头。好吧,这是个傻子 问题..但让我觉得有些东西不正常
I've configured CEDET for emacs following Alex article (great!!).
Now, the questions:
- I've generated GTAGS with Gnu Global in my
/usr/include
, how can i check if semantic is using GTAGS? - Can I keep my GTAGS in another directory and instruct semantic to use that dir?
- In C/C++ sources, completion on include statement (from system
headers) doesn't list all available headers. Ok, this is a stupid
problem.. but makes me think something is not working right
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用命令:
来了解您的包含路径和 CPP 宏设置。
要测试 GNU Global 使用,您可以使用:
在某个项目中搜索“printf”。由于您的项目(可能在 /home/you/myproject 中)中没有 printf,因此它将失败,但如果您在 /usr/include 中打开一个文件,并执行相同的命令,它有望识别 printf。
询问 GNU Global 的更通用方法是:
总而言之,在您想要拥有大量不经常访问的准备好的文件的情况下,GNU Global 支持是最好的。一旦某个标头被访问一次(如 printf),那么 GNU 全局数据库将不再被使用,因为将为它创建一个等效的语义数据库。这是必要的,因为 GNU Global 没有提供足够的信息来进行智能补全。
You can use the command:
to find out about your include path and CPP macro settings.
To test GNU Global use, you can use:
to search for "printf" in in some project. Since your project (perhaps in /home/you/myproject) does not have printf in it, it will fail, but if you opened a file in /usr/include, and did the same command, it will hopefully identify printf.
A more general way to ask about GNU Global is with:
That all said, the GNU Global support is best in situations where you want to have lots and lots of preparsed files that you access infrequently. Once a header is accessed once (like for printf), then the GNU Global database won't be used anymore, because an equivalent Semantic database will have been created for it. This is necessary because GNU Global does not provide enough information to do smart completion.