PDA

View Full Version : Qt Creator Parse compiler errors of a non gcc compiler



kiozen
30th June 2011, 11:24
Hi,

I like qtcreator very much and would love to use it as IDE for an embedded project. I already imported that project by doing "new project -> other project -> from existing project". Worked fine. All files found, cross references created. Next I added my project's own build and clean command. The project compiles.

The only caveat: The compiler does not have the same output string pattern for errors and warnings like gcc. Thus qtcreator does not recognize the lines. No double click on error :( Usually, other multi-purpose IDEs let you define some regular expressions to catch the needed information. Somehow I was not able to find such a mechanism in qtcreator.

Not possible? Me blind? Works completely different?

I would really appreciate a solution for that to say good by to Eclipse.

Thanks

Oliver

mvuori
1st July 2011, 20:15
Nobody seems to know. I don't think it is possible and I think it is completely ok considering the purpose and goals of this IDE. Eclipse is really an exception here, even though it may be the most general-use ide ever.

squidge
1st July 2011, 21:11
Last time I did something like this I just piped the output from the compiler through a custom perl script which converted it to GCC-like output.

kiozen
1st July 2011, 22:00
Hm, perl script. That's an idea. However I am not supposed to change makefile or build script. On the other hand side, who does what he is supposed to :) I'll give it a try.

ChrisW67
4th July 2011, 01:34
Here are some possible approaches:

Name your wrapper script the same as the compiler and make sure it is found in the PATH before the real compiler (relies on the Makefile just invoking the compiler without a path).
Set the CC environment variable to point at your wrapper script instead of the real compiler as many Makefiles honour this because they use default rules.
Capture the entire output of your make call in a temporary file then add a Qt Creator build step to post-process that file and output to stdout/stderr.

Whether these work depends to a good degree on your your Makefile is written.