Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Problems tab and Console regular expressions(Getting items to the Problems tab from the console window)
Problems tab and Console regular expressions [message #1836302] Mon, 28 December 2020 18:28 Go to next message
ANDREW MEYER is currently offline ANDREW MEYERFriend
Messages: 4
Registered: December 2020
Junior Member
I have set up a makefile project to compile and link HCS12 code using the free codewarrior tools. It all seems to work well, but the only error/warning/information output I can get is to the console, with nothing being scanned from there into the Problems window. I set up a regular expression error parser(Window -> Preferences -> C/C++ -> Build -> Settings -> Error Parsers) to scan the console for the appropriate information. If I search the console output (click in output and <ctrl>F) using find/replace with "regular expressions" checked, I find the warnings and errors--they just never get to the Problems tab.

I have enabled the error parser in (Project->Properties->C/C++ Build->Settings->ErrorParsers).

Still no output to the Problems Tab, and I am out of ideas. Please Help!!

Somewhere I read that I need to enable this in C/C++ Makfile settings--but I cannot fine any settings which include the name "Makefile"; did I set up my project wrong??

Eclipse Luna, Windows 7 professional.

[Updated on: Tue, 29 December 2020 18:17]

Report message to a moderator

Re: Problems tab and Console regular expressions [message #1837174 is a reply to message #1836302] Sat, 23 January 2021 14:31 Go to previous message
ANDREW MEYER is currently offline ANDREW MEYERFriend
Messages: 4
Registered: December 2020
Junior Member
It seems that the Regex parser for Eclipse (at least the older version I am currently using) assumes you start at the beginning of a line of text and end at the end of a line of text. My compiler errors were spanning multiple lines; I found a switch in the compiler which allowed it to output the errors in "microsoft format", which was then on a single line.

the new warning line looks like .\CODE\LIBCODE\CodeLibraries\Drivers\CI2C1.C(312): WARNING C1801: Implicit parameter declaration for 'CI2C1_OnMasterBlockSent'

regex that works is now [^"\n]\([^"(])((\d+)): WARNING C(\d+):([^\n]*)

of particular note is the [^"\n]*\ at the beginning of the regex expression, which matches all characters from the beginning of the line until the last \ is found--this is the piece I was missing. Eclipse Kepler is rather unforgiving about the regex it requires.

and we have File $1 (just the file name--eclipse adds the path mysteriously if the file is in a code directory of the project)

Line $2 (gathers the line number of the error)

Descrioption $4 ( I ignore WARNING and the warning number, and capture the description of the error to the end of the line)

I now have a useful and somewhat more modern IDE to work with ancient code which grew from the assembly code over many years and was never parsed out into libraries or restructured into modern levels of abstraction.

Previous Topic:Error Parser with external Compiler in CDT
Next Topic:documentation of C functions in eclipse
Goto Forum:
  


Current Time: Thu Oct 10 01:07:47 GMT 2024

Powered by FUDForum. Page generated in 0.05889 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top