[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange global behavior on c++ files

From: Shigio YAMAGUCHI
Subject: Re: strange global behavior on c++ files
Date: Fri, 21 Aug 2009 15:11:13 +0900

> recently I have found some strange behavior of global while working
> with C++ files.
> The situation:
> foo.h:
> class Foo {
>  public:
>       Foo();
>       ~Foo();
> };
> then after indexing, I see everything is ok - result of "global -s -x"
> shows 3 lines with "Foo".
> However after adding file foo.cpp with the implementation of
> constructor/destructor and rebuilding tags,
> the result of "global -s -x" shows NOTHING. No any symbols found! (but
> "global -x Foo" shows correctly results from foo.cpp).
> Do you have idea of the reason of that behavior? Maybe some hints how to fix 
> it?

It seems that Foo.h is considerred to be not C++ but C file.
The mapping of the extension and the language is shown.

c, h => C
c++, cpp, cxx, hxx, hpp, C, H => C++

You can change it using the .globalrc file in your home directory.

$ cd $HOME
$ cp /usr/local/share/gtags/gtags.conf .globalrc


You can also rewrite the configure.ac file directly before building.

Best regards
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]