Re: about *.hpp
Shigio Yamaguchi <[email protected]>
| Newsgroups | gmane.comp.gnu.global.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, > I attempted to use C++ source by global. > But it is not generated crossreference of *.hpp and *.cpp. > It was generated only *.h and *.cpp. > In gtags.conf I changed from hxx to hpp. but in vain. > Why ? By default, gtags considers only the following file to be a source file of C++. *.c++ *.cc *.cpp *.cxx *.hxx *.C *.H To treat *.hpp as C++ source file, you have to setup the configuration file of GLOBAL like follows: 1. Copy 'gtags.conf' from GLOBAL package to $HOME/.globalrc. 2. Modify the file like follows: a) Add 'hpp' to suffixes list. b) Add --langmap option which include 'hpp'. [$HOME/.globalrc] +--------------------------------------------------------------------------- |gctags|tag command for GLOBAL:\ | :tc=common:\ | :suffixes=c,h,y,c++,cc,cpp,cxx,hxx,C,H,s,S,java,php,php3,phtml:\ | :sort_command=sort:\ | :sed_command=sed:\ | :GTAGS=gctags -dt %s:\ | :GRTAGS=gctags -dtr %s:\ | :GSYMS=gctags -dts %s: | v +--------------------------------------------------------------------------- |gctags|tag command for GLOBAL:\ | :tc=common:\ | :suffixes=c,h,y,c++,cc,cpp,cxx,hxx,C,H,hpp,s,S,java,php,php3,phtml:\ | :sort_command=sort:\ | :sed_command=sed:\ | :GTAGS=gctags --langmap=c\:.c.h,yacc\:.y,cpp\:.c++.cc.cpp.cxx.hxx.C.H.hpp -dt %s:\ | :GRTAGS=gctags --langmap=c\:.c.h,yacc\:.y,cpp\:.c++.cc.cpp.cxx.hxx.C.H.hpp -dtr %s:\ | :GSYMS=gctags --langmap=c\:.c.h,yacc\:.y,cpp\:.c++.cc.cpp.cxx.hxx.C.H.hpp -dts %s: Then gtags will pick up *.hpp as a C++ source file. Good luck! -- Shigio Yamaguchi <[email protected]> - Tama Communications Corporation PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3