I'm using an ARM compiler (RVDS) and using Visual C++ 2005 Express as my IDE because I'm not a fan of the old version of Eclipse that ARM chose. I created a makefile project which builds correctly. Unfortunately when there is a compile error the error shows up in the "Error" pane, but double clicking the error does not open the file in the editor.
In the "Error" pane the correct file is shown, but the line number is blank. Is there a way to get Visual C++ to better parse the error messages to extract the correct line numbers and link the errors to the editor?
UPDATED: Visual C++ parsed the compiler output correctly when I created the solution/project in the same directory as the makefile or build scripts. I only had this problem when the solution/project was created in a different directory than the makefile.
In the past I've used a script that filtered my 3rd-party compiler's error message into the format Visual Studio expects. I've since lost the scripts (due to not needing them in a while, changin job, etc.).
Here's a mirror of a Microsoft newsgroup posting (I can't find the post in Google Groups) that describes a similar process along with a sed script:
The relevant information is that the VS build configuration launches the tool and pipes the output through a sed script:
CALL mm.bat 2<&1 | sed -u -f ..\..\errfix.sed
and the sed script:
#------- START errfix.sed
#MPC561 - TYPE:\1 ID:\2 FILE:\3 LINE:\4 POS:\5 REST:\6
s/^(\([EWI]\)) \([A-Z][0-9]*-*[A-Z]*\); "\(.*\)", line \([0-9]*\) pos \([0-9]*\); \(.*\)/\3(\4) : (\1) \2 : \6/
s/(E)/Error/g
s/(W)/Warning/g
s/(I)/Informational/g
s/..\\..\\..\\cu\\//
s/..\\..\\../../
#------- END
I imagine the script would need to be tailored to your particular tool - the script looks pretty intimidating at first glance (to me anyway), but I 'd bet it wouldn't be too difficult to get it massage the output to what VS expects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With