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

From: Mitchell <m.att.foicica.com>
Date: Thu, 28 Mar 2013 22:05:46 -0400 (EDT)

On Mon, 25 Mar 2013, Mitchell wrote:

> Hi Ryan,
>
> On Mon, 25 Mar 2013, Ryan Pusztai wrote:
>
>> Hi,
>>
>> I am trying to make the correct "error_details" for a newer version of GCC
>> than the default TA CPP module has. GCC added 'line column' to the error
>> output.
>>
>> This was easy to fix, but now my error messages from GCC don't have the
>> path prepended to the filename that is compiling. This causes TA to open an
>> empty buffer with just the name of the filename and it doesn't find the
>> file because it is in a sub-directory. Any thoughts into a way to solve
>> this. I am working with source that uses sub-directories quite a bit.
>>
>> Here is my definition in the `post_init.lua` file: (Notice the extra %d+:)
>> m_run.error_detail.c = {
>> pattern = '^(.-):(%d+):%d+: (.+)$',
>> filename = 1, line = 2, message = 3
>> }
>>
>> Here is the error message I attempt to double-click on:
>> ScsSpeedDistanceProcessor.cpp:14:25: fatal error: ../CudUtils.h: No
>> such file or directory
>>
>> Thoughts?
>
> Does it work if you comment out modules/textadept/run.lua:73?
> ("lfs.chdir(current_dir)")
>
> If so, I think the implementation needs to be tweaked to store the working
> directory somewhere (maybe in the output or in a variable).

Latest hg[1] stores the cwd of the most recently executed compile/run
command so double-clicking errors for relative file paths should be more
accurate for files that are not already open.

Cheers,
Mitchell

[1]: http://foicica.com/hg/textadept/rev/8b154077799b

-- 
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 Thu 28 Mar 2013 - 22:05:46 EDT

This archive was generated by hypermail 2.2.0 : Fri 29 Mar 2013 - 06:51:46 EDT