I have been trying to improve the quickfix facilities
obtainable from gcc and I have modified it thusly:
--- /usr/local/share/vim/vim70/compiler/gcc.vim 2006-07-19 18:11:22.117752000
+0100
+++ /home/hgs/.vim/compiler/gcc.vim 2006-11-22 18:33:39.269332000 +0000
@@ -16,6 +16,8 @@
\\"%f\"%*\\D%l:\ %m,
\%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\
once,
\%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
+ \%E%f:%l:\ multiple\ definitions\ of\ %m,
+ \%Z%*\\s:%f:%l:\ first\ defined\ here,
\%f:%l:\ %m,
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
But when I get results like:
/home/hgs/fsv/rawimage.c:97: multiple definition of `image_check_is_png'
image.o:/home/hgs/fsv/image.c:97: first defined here
vim tries to pickup a file called image.o:/home/hgs/fsv/image.c
for the second line (:cn) which clearly doesn't exist.
I have tried the following forms of this second line in order to modify
what is detected before the %f :-
\%Z%*\\s:%f:%l:\ first\ defined\ here,
\%Z%.%#:%f:%l:\ first\ defined\ here,
\%Z%*[^:]:%f:%l:\ first\ defined\ here,
\%Z%m:%f:%l:\ first\ defined\ here,
\%Z%*f:%f:%l:\ first\ defined\ here,
The latter of which complains about 2 %f symbols in the line, despite the
first having a * in it.
How do I NOT pickup the object file before the ":%f:\ first\ defined\ here"?
Hugh