[Geany] Generating custom tags file in Windows

Lex Trotman elextr at xxxxx
Wed May 25 01:39:11 UTC 2011


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



More information about the Users mailing list