Hi,
> 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

[$HOME/.globalrc]

c:.c.h,yacc:.y,asm:.s.S,java:.java,cpp:.c++.cc.cpp.cxx.hxx.hpp.C.H,...
    ==
        |
        v
c:.c,yacc:.y,asm:.s.S,java:.java,cpp:.c++.cc.cpp.cxx.hxx.hpp.C.H.h,...
                                                                ==
You can also rewrite the configure.ac file directly before building.

Best regards
Shigio
--
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


_______________________________________________
Bug-global mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to