I am tried to get to work GNU Globals in my Emacs, and found that it is couldn't find a function definitions. After a long searching I end up that GNU Globals itself just somehow broken for me, it doesn't index almost anything! Consider an example:
$ cat test.cpp
class Foo {
public:
int myint;
short myshort;
char mychar;
};
int main() {
Foo obj;
obj.myint = 0;
return 0;
}
$ gtags
$ global Foo
test.cpp
$ global myint
$ global -r myint
$ global Foo::myint
$ global -r Foo::myint
$ cat GTAGS | grep myint
In the end I tried to grep «myint» and found that it isn't even present in GTAGS! The only place where it is mentioned is a GSYMS file. Of course, at first I tried the same code with a separate «.hpp» file, it didn't worked either.
UPDATE: I found that it is possible to create Global Tags with both of ctags and etags. For that it is need to issue export GTAGSLABEL=/usr/bin/etags
(or to ctags), and launch gtags
again. The variable works, it is easy to check by adding there a wrong path, so gtags would say about an error. So, I tried with my example the both backends, and neither worked.