Wednesday, January 23, 2013

Re: Quickfix Has Wrong Path to Source Files

On Wednesday, January 23, 2013 9:21:08 AM UTC-6, Stephen Rasku wrote:
> Hi,
>
>
> I want to use the vim quickfix window to find errors in my source files when I compile.  I notice that I am getting errors like this in the quickfix window:
>
>
>
>
> build/i586-linux//local/work/dept/users/repo.git/src/fd_set/src/fd_set.c|151 error| error: 'struct fd_group' has no member named 'fg_maxfd'
>
> When I click on it, it opens a new file due to the build/i586-linux// prefix.  I am confused as to why its doing this because I am getting the following line when I build from the command line:
>
>
>
>
>
> /local/work/dept/user/repo.git/src/fd_set/src/fd_set.c: In function 'fd_group_create':
>
> /local/work/dept/user/repo.git/src/fd_set/src/fd_set.c:151: error: 'struct fd_group' has no member named 'fg_maxfd'
>
>
>
> We are using make to call cmake so that may be the reason.
>
>
> Some possibly relevant settings:
>
>
>
>
> set shellpipe=2\>&1\|ccfilter\ -e\|tee
> set errorformat=%f:%l:%c:%t:%m
>
>
> I have another development environment on the same machine where it works fine.  It's only generating local file names so that may be why it works.
>
>
>
>
>  Is there a way to resolve this so that I can click on an error and open the actual file the error is in?
>
>

Your error format "%f:%l:%c:%t:%m" will not match your example error output:

/local/work/dept/user/repo.git/src/fd_set/src/fd_set.c:151: error: 'struct fd_group' has no member named 'fg_maxfd'

because there is no column number (%c) and because the %t item only matches a single character, not the full word "error", and because there are spaces in your error message not accounted for in your errorformat.

I'm not actually sure how Vim is recognizing it as an error in the first place, if it is at all, unless your errorformat is not what you think it is.

What does the ccfilter command in your shellpipe do? Maybe that is modifying the compiler output as seen on the command line?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment