Re: [code] How to get GCC compiler errors to work

From: Chris Emerson <c-ta.att.mail.nosreme.org>
Date: Mon, 22 Apr 2013 09:55:59 +0100

On Sat, Apr 20, 2013 at 06:12:38PM -0400, Mitchell wrote:
> On Fri, 19 Apr 2013, Ryan Pusztai wrote:
> >Not quite because GCC/Make doesn't output the full file path. It generates
> >it relative to the currently running makefile. I have a top level Makefile
> >that runs "sub-makefiles" in other subdirectories.
> >
> >[snip]
> >
> >Output from makefiles:
> > Mobius_Utils/formats/StaticCyclicSequence.cpp:43:63: error: ‘class......
> >
> >when double-clicking it uses:
> > ~/projects/my_project/Mobius_Utils/formats/StaticCyclicSequence.cpp
> >
> >should actually be:
> >
> >~/projects/my_project/mobius/Mobius_Utils/formats/StaticCyclicSequence.cpp
>
> I think in your case it is nearly impossible to recognize what a
> path is relative to after the fact when there are a number of
> possibilities. Is there a CFLAGS or CXXFLAGS that you can pass to
> gcc/g++ such that they output full paths? I think that is your best
> bet.

make normally also outputs lines of the form:

make: Entering directory `/home/blah/foo'
[... submake output ...]
make: Leaving directory `home/blah/foo'

which vim at least uses to solve this problem.

Regards,

Chris

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 22 Apr 2013 - 04:55:59 EDT

This archive was generated by hypermail 2.2.0 : Mon 22 Apr 2013 - 06:53:04 EDT