Looking at the geany documentation, as I understand it, I should be able to generate a custom tags file with:
geany -g mingw.c.tags c:\mingw\include
As long as MinGW gcc is in my path (which it is) and grep is available (which it is). Yet when I run this command, I have a command box briefly pop-up and no tags file is generated. Am I missing something?
I've installed geany 0.20 with overlaying the latest nightly on top.
Thank you,
Chris
On 05/24/11 09:15, Chris Sutcliffe wrote:
Looking at the geany documentation, as I understand it, I should be able to generate a custom tags file with:
geany -g mingw.c.tags c:\mingw\include
As long as MinGW gcc is in my path (which it is) and grep is available (which it is). Yet when I run this command, I have a command box briefly pop-up and no tags file is generated. Am I missing something?
I've never tried on Windows, but I've used many times on Linux and always specified a files list (or glob actually). From the manual:
geany -g [-P] <Tag File> <File list>
"File list is a list of filenames, each with a full path (unless you are generating C/C++ tags and have set the CFLAGS environment variable appropriately)."
Probably try this:
geany -g mingw.c.tags c:\mingw\include*.h
Though that might be a weird tags file depending on what's all in that directory.
Cheers, Matthew Brush
On 24 May 2011 13:17, Matthew Brush wrote:
On 05/24/11 09:15, Chris Sutcliffe wrote:
Looking at the geany documentation, as I understand it, I should be able to generate a custom tags file with:
geany -g mingw.c.tags c:\mingw\include
As long as MinGW gcc is in my path (which it is) and grep is available (which it is). Yet when I run this command, I have a command box briefly pop-up and no tags file is generated. Am I missing something?
I've never tried on Windows, but I've used many times on Linux and always specified a files list (or glob actually). From the manual:
geany -g [-P] <Tag File> <File list>
"File list is a list of filenames, each with a full path (unless you are generating C/C++ tags and have set the CFLAGS environment variable appropriately)."
Probably try this:
geany -g mingw.c.tags c:\mingw\include*.h
Turns out I'm able to generate the tags file with:
geany -g -P mingw.c.tags c:\mingw\include*
Without the '-P' I get nothing. Looking at the documentation:
"-P or --no-preprocessing disables using the C pre-processor to process #include directives for C/C++ source files. Use this option if you want to specify each source file on the command-line instead of using a 'master' header file. Also can be useful if you don't want to specify the CFLAGS environment variable."
I have mingw's gcc in my path though. What does geany call as the C pre-processor?
Thank you,
Chris
On 25 May 2011 04:38, Chris Sutcliffe ir0nh34d@gmail.com wrote:
On 24 May 2011 13:17, Matthew Brush wrote:
On 05/24/11 09:15, Chris Sutcliffe wrote:
Looking at the geany documentation, as I understand it, I should be able to generate a custom tags file with:
geany -g mingw.c.tags c:\mingw\include
As long as MinGW gcc is in my path (which it is) and grep is available (which it is). Yet when I run this command, I have a command box briefly pop-up and no tags file is generated. Am I missing something?
I've never tried on Windows, but I've used many times on Linux and always specified a files list (or glob actually). From the manual:
geany -g [-P] <Tag File> <File list>
"File list is a list of filenames, each with a full path (unless you are generating C/C++ tags and have set the CFLAGS environment variable appropriately)."
Probably try this:
geany -g mingw.c.tags c:\mingw\include*.h
Turns out I'm able to generate the tags file with:
geany -g -P mingw.c.tags c:\mingw\include*
Without the '-P' I get nothing. Looking at the documentation:
"-P or --no-preprocessing disables using the C pre-processor to process #include directives for C/C++ source files. Use this option if you want to specify each source file on the command-line instead of using a 'master' header file. Also can be useful if you don't want to specify the CFLAGS environment variable."
I have mingw's gcc in my path though. What does geany call as the C pre-processor?
Thank you,
Hi Chris,
It runs
gcc -E -dD -p -undef
Cheers Lex
Chris
-- Chris Sutcliffe http://emergedesktop.org http://www.google.com/profiles/ir0nh34d _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On 24 May 2011 20:37, Lex Trotman wrote:
On 25 May 2011 04:38, Chris Sutcliffe wrote:
Turns out I'm able to generate the tags file with:
geany -g -P mingw.c.tags c:\mingw\include*
Without the '-P' I get nothing. Looking at the documentation:
"-P or --no-preprocessing disables using the C pre-processor to process #include directives for C/C++ source files. Use this option if you want to specify each source file on the command-line instead of using a 'master' header file. Also can be useful if you don't want to specify the CFLAGS environment variable."
I have mingw's gcc in my path though. What does geany call as the C pre-processor?
It runs
gcc -E -dD -p -undef
Interesting, running that from command line like so:
gcc -E -dD -p -undef c:\mingw\include*
works fine. Running the geany command from within MSYS I get:
$ geany.exe -g test.c.tags /mingw/include/* 'G_END_DECLS)\s*$'' is not recognized as an internal or external command, operable program or batch file. Failed to create tags file, perhaps because no tags were found.
What tools are used to parse the pre-processor output?
Cheers,
Chris
It runs
gcc -E -dD -p -undef
Interesting, running that from command line like so:
gcc -E -dD -p -undef c:\mingw\include*
works fine. Running the geany command from within MSYS I get:
$ geany.exe -g test.c.tags /mingw/include/* 'G_END_DECLS)\s*$'' is not recognized as an internal or external command, operable program or batch file. Failed to create tags file, perhaps because no tags were found.
What tools are used to parse the pre-processor output?
Here is the bit of code that creates the command, pre_process is the gcc command above and temp_files are obvious.
g_strdup_printf("%s %s | grep -v -E '^\s*(G_BEGIN_DECLS|G_END_DECLS)\s*$' > %s", pre_process, temp_file, temp_file2);
As you can see the |G_END_DECLS bit is part of a regex for grep, but it appears to be being interpreted as a pipe between commands.
Since it works elsewhere this would appear to be a problem with your shell not parsing correctly. (Un?)fortunately I don't know anything about fauxnix shells on Windows so I can't help you there.
Cheers Lex