|
|
 |
|
 |
use the sed.exe
This is my bat file.
C:\WinAvr\Utils\Bin\make %1 2>&1 | sed "s/\([coph]\):\([0-9]*\)/\1(\2)/"
|
|
|
|
 |
|
 |
Thanks for this!!!... I got the kernel and other apps building under visual studio by simply using C:\cygwin\bin\ssh.exe to natively compile under a Linux VMWare session! =) This is probably an unforgivable sin (to build linux apps in visual studio), but there's just no comparable IDE for linux.
|
|
|
|
 |
|
 |
Thank you for very useful article.
I intented to use Object Model to have access to Output Window, but I had not found any hooks.
So I would never found this undocumented feature of Output Window without your help.
I would like to share here my problems in implementation.
I tried to make, following your instruction, the Tool for GCC.
My try was:
Command "C:\WinAVR\utils\bin\make.exe"
Argument "all | munge.pl"
and
Initial directory "$(CurDir)"
where munge.pl is just what you proposed for GCC.
Oddly enough (when I bracketed Perl output) I found error lines unchanged.
When I used
Argument "all 2>err.lst"
I found all error lines there, so they are transferred to STDERR,
and appeared in Output Window after Perl output
But all my efforts to make it work like
Argument "all 2>&1 | munge.pl"
or
Argument "all 2 | munge.pl"
did not work out.
So I ended up with two Tools, which is not this convinient.
Does anybody have a solution ?
decently happy unemployed software engineer
|
|
|
|
 |
|
 |
Alas, DOS command lines don't behave like Unix/Cygwin. I used a DOS batch file to actually invoke a bash script (under cygwin). I should have tested it completely in DOS. My apologies.
Try this batch file (doGCCMake.bat):
C:\WinAVR\utils\bin\make %1 > err.lst 2>&1
munge.pl < err.lst
where %1 would be the argument 'all'
The 2>&1 seems to be required on the end and doesn't seem to work with a pipe (|).
|
|
|
|
 |
|
 |
For PC Lint use this LNT file: //¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ // ENV-VS6.LNT - Error message formatting for Visual Studio // See file ENV-VS6.TXT for setup info //¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ -t3 //tabsize -hFb3 // ¦ Make sure we ALWAYS provide file information ('F') and use x // lines (line in error plus message). // Only relevant where 4 lines specified //-format4a=______________________________________________________________ //-format4b=¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Message format: Messages can contain // file information (%F), the line number (%l), the // message number (%n), message type (%t) and message text (%m). // as: F:\PC\SupClass\DiskInfo.cpp(146): error 613: (Warning -- Possible use of null pointer (szPathName) in left argument to operator 'ptr+int') //-"format=%(%F(%l):%) error %n: (%t -- %m)" //-"format=%(%F(%l):%)\n e%n %t: %m\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯" // Produce lines like: // e1746 Info: parameter 'point' in function 'CXStatus... // F:\PC\SupClass\XStatBar.cpp(430): // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -"format=%( e%n %t: %m\n%F(%l):%)\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯" //-width(0) // don't break messages at any particular width -width(80,2) // break messages at col X, then indent Y +ffn // full file names for Visual Studio //¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ EOF ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ gjr
|
|
|
|
 |
|
 |
If its just PC-Lint output you want formatted into the Output Window use this LNT file: //¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ // ENV-VS6.LNT - Error message formatting for Visual Studio //¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ -t3 //tabsize -hFb3 // ¦ Make sure we ALWAYS provide file information ('F') and use x // lines (line in error plus message). // Message format: Messages can contain // file information (%F), the line number (%l), the // message number (%n), message type (%t) and message text (%m). // as: F:\PC\SupClass\DiskInfo.cpp(146): error 613: (Warning -- Possible use of null pointer (szPathName) in left argument to operator 'ptr+int') //-"format=%(%F(%l):%) error %n: (%t -- %m)" //-"format=%(%F(%l):%)\n e%n %t: %m\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯" // Produce lines like: // e1746 Info: parameter 'point' in function 'CXStatus... // F:\PC\SupClass\XStatBar.cpp(430): // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -"format=%( e%n %t: %m\n%F(%l):%)\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯" //-width(0) // don't break messages at any particular width -width(80,2) // break messages at col X, then indent Y +ffn // full file names for Visual Studio //¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ EOF ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ gjr
|
|
|
|
 |
|
 |
That's good! Avoids having to reformat the output.
|
|
|
|
 |
|
 |
Hi all,
There is also a tool named ALOA, which allow to integrate and analyze lint outpu in VS.
Take a look at it.
|
|
|
|
 |
|
|
General
News
Suggestion
Question
Bug
Answer
Joke
Rant
Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.