1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
|
___________________________________
| | | | | _ | | |
| |___| | | | | _| | | | GNU GLOBAL source code tagging system
| | | | | | | | | |
| ~~ | ~~| | ~ | | | ~~| for all hackers.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copyright (c) 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012,
2014, 2020
Tama Communications Corporation
This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
modifications, as long as this notice is preserved.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
----------------------------------
Frequently Asked Questions about Global.
----------------------------------------------------------------------------
Q1. Does Global support DOS and Windows 32 environment?
A1. No, it doesn't. GNU Global supports only UNIX(POSIX) environment.
But some outside projects develop DOS and Windows 32 version of it.
Please see:
http://www.gnu.org/software/global/download.html
Though Global doesn't supports DOS and Windows 32 environment,
we accept code for them if the following requirements are met:
(1) It works in DOS and(or) Windows 32 environment.
(2) It doesn't influence UNIX environment.
----------------------------------------------------------------------------
Q2. Global skips some functions.
For example, Global skips 'func()' in this example.
#define M(a) static char *string = a;
M(a)
func() { <= Global skip func().
...
}
A2. Global cannot recognize 'func()', because M(a) seems to be a function
definition.
It should be follows:
#define M(a) static char *string = a
M(a); <= end with ';'
func() {
...
}
Otherwise, you can tell gtags(1) that 'M' is not a function by listing
the macros in '.notfunction' file in the root directory of the project.
[.notfunction]
+---------------
|M
|...
----------------------------------------------------------------------------
Q3. I'm a C++ programmer. Why does not gtags pick up class names in *.h?
A3. Global treats *.h files as a C source file. If you want to treat them
as a C++ source file, please set environment variable GTAGSFORCECPP.
% setenv GTAGSFORCECPP
or
$ export GTAGSFORCECPP=
----------------------------------------------------------------------------
Q4. I'm using GNU system. In a large project, gtags fails in making tags
like follows:
$ gtags
gtags: cannot write to database.
$ _
File system is not full. It seems that gtags cannot make a file over 2GB.
Any solution?
A4. If your GNU system supports 64-bit file offset then please try the
following configuration.
$ ./configure CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64'
----------------------------------------------------------------------------
Q5. What is this message? What should I do?
'configure: error: curses library is required but not found."
A5. gtags-cscope(1) requires curses library. There are two choices of yours.
If you use gtags-cscope(1)
Please install curses library. You can get it from:
http://www.gnu.org/software/ncurses/
else
You can install Global without gtags-cscope(1) like follows:
$ ./configure --disable-gtagscscope
$ make
----------------------------------------------------------------------------
Q6. I would like to use Global with various languages, such as python, ruby,
Erlang, Lua or so on. How to do it?
A6. You can do it using ctags and pygments plug-in parser. It already supports
25 languages (definition and reference).
Please see PLUGIN_HOWTO (ctags), PLUGIN_HOWTO.pygments (Pygments)
in the package or /usr/local/share/gtags.
----------------------------------------------------------------------------
Q7. Gtags(1) and htags(1) work only for one directory tree. So, we cannot
refer library functions like strlen() from my project. Any solutions?
A7. For global(1), you can use GTAGSLIBPATH environment variable.
[library] /usr/src/lib
[your project] /usr/home/project
$ (cd /usr/src/lib; gtags)
$ export GTAGSLIBPATH=/usr/src/lib
$ global strlen
../../../usr/src/lib/libc/string/strlen.c
Or, you can take a more straightforward way to do the same thing.
In the following example, you treat as if the system library is
part of your project. This way is effective also to htags(1).
$ cd /usr/home/project
$ ln -s /usr/src/lib .
$ gtags
$ htags
----------------------------------------------------------------------------
Q8. I can't make GSYMS file.
A8. No problem. GSYMS was merged into GRTAGS in Global-5.9 or later.
----------------------------------------------------------------------------
Q9. I'm using gtags-cscope.vim. How to use files which include spaces in path name?
A9. Please apply 'vim74-gtags-cscope.patch' in the package to vim.
See also README.PATCHES.
----------------------------------------------------------------------------
Q10. Does Global support multi-byte code set?
Which character code set is supported?
A10. Global doesn't support multi-byte character code set yet.
Global supports only ASCII and ASCII super-sets.
----------------------------------------------------------------------------
Q11. Can Global running on a UNIX machine treat source files
which include DOS/Windows style new-line code? And vice versa?
A11. Global supports only native text format of POSIX.
Besides, please go by the own responsibility.
----------------------------------------------------------------------------
Q12. Does Global support C++ language?
A12. The answer is yes and no.
The built-in C++ parser is deprecated, since it is not well maintained.
However, Global has a plug-in parser mechanism. Using the mechanism,
anyone can write parsers for their favorite languages and incorporate
them into Global. (see plugin-factory/)
So, if you write a parser for C++ language, Global supports it.
End of FAQ.
|