如何在GNU Global gtags.conf文件中指定环境变量 指定一个有用的环境变量,名为“代码> GTAGSFRECCEPP < /C> >强制 .h < /C>文件被视为C++(否则,C++类定义不被添加到标签数据库中作为符号)。理想情况下,我不必在启动脚本中设置该env var,而是以某种方式将其表达为位于中心位置的gtags.conf,可以与网络中的其他开发人员共享。gtags手册(特别是)的措辞使我相信它是可能的: You can use the following environment variables as a string variable. If these variables are set then environment variables of the same name are set before command execution. GREP_COLOR GREP_COLORS GTAGSBLANKENCODE GTAGSCACHE GTAGSFORCECPP GTAGSGLOBAL GTAGSGTAGS GTAGSLIBPATH GTAGSLOGGING GTAGSTHROUGH GTAGS_OPTIONS HTAGS_OPTIONS MAKEOBJDIR MAKEOBJDIRPREFIX TMPDIR The following variables are also available as a string variable. By default, each of them has a directory path given by the configure script. bindir datadir libdir localstatedir sysconfdir

如何在GNU Global gtags.conf文件中指定环境变量 指定一个有用的环境变量,名为“代码> GTAGSFRECCEPP < /C> >强制 .h < /C>文件被视为C++(否则,C++类定义不被添加到标签数据库中作为符号)。理想情况下,我不必在启动脚本中设置该env var,而是以某种方式将其表达为位于中心位置的gtags.conf,可以与网络中的其他开发人员共享。gtags手册(特别是)的措辞使我相信它是可能的: You can use the following environment variables as a string variable. If these variables are set then environment variables of the same name are set before command execution. GREP_COLOR GREP_COLORS GTAGSBLANKENCODE GTAGSCACHE GTAGSFORCECPP GTAGSGLOBAL GTAGSGTAGS GTAGSLIBPATH GTAGSLOGGING GTAGSTHROUGH GTAGS_OPTIONS HTAGS_OPTIONS MAKEOBJDIR MAKEOBJDIRPREFIX TMPDIR The following variables are also available as a string variable. By default, each of them has a directory path given by the configure script. bindir datadir libdir localstatedir sysconfdir,c++,gnu-global,C++,Gnu Global,然而,我不知道在哪里表达它。例如,这样添加会导致解析错误,因此这是不正确的: # # Built-in parsers. # gtags:\ :tc=common:\ :tc=builtin-parser:\ :GTAGSFORCECPP=1: 我所追求的是强制所有的 .h < /C>文件被视为C++,因此可能有更好的方法来处理它。

然而,我不知道在哪里表达它。例如,这样添加会导致解析错误,因此这是不正确的:

#
# Built-in parsers.
#
gtags:\
    :tc=common:\
    :tc=builtin-parser:\
    :GTAGSFORCECPP=1:

我所追求的是强制所有的<代码> .h < /C>文件被视为C++,因此可能有更好的方法来处理它。