关于cscope索引hpp文件的问题
我有模板类A,定义在a.hpp
a.h
template <...>
A
{
void Test();
};
#include a.hpp
中,如果let
cscope -bq a.h
那么cscope可以找到Test声明,但找不到定义。
如果让的
cscope -bq a.h a.hpp
话cscope甚至找不到Test声明。 有什么建议吗? 谢谢。
i have template class A, the definition is in a.hpp
a.h
template <...>
A
{
void Test();
};
#include a.hpp
if let
cscope -bq a.h
then cscope can find Test declaration, but cannot find definition.
if let
cscope -bq a.h a.hpp
then cscope even cannot find Test declaration.
any advice?
thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
哪个版本的 cscope 在哪个平台上?
使用如图所示的代码:
ah
a.hpp
并使用在 MacOS X 上编译的 cscope 15.7a(在 10.6.4 上运行,可能在早期版本上编译),我做了:
然后搜索 Test 并看到:
搜索
A::Test
返回错误:因此,从表面上看,您需要升级到 cscope 15.7a(或降级到它?)。
Which version of cscope on which platform?
With the code as shown:
a.h
a.hpp
and using cscope 15.7a compiled on MacOS X (running on 10.6.4, probably compiled on an earlier version), I did:
and then searched for Test and see:
A search for
A::Test
comes back with the error:So, superficially, you need to upgrade to cscope 15.7a (or downgrade to it?).