Eclipse CDT的自定义编译器错误解析插件 [英] Eclipse CDT Custom Compiler Error Parsing Plugin

查看:138
本文介绍了Eclipse CDT的自定义编译器错误解析插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是一种罕见的C编译器与Eclipse CDT。我有一个make文件设置这是很好的,但我想IDE集成的错误/警告我的编译器的输出。

I'm using an uncommon C compiler with Eclipse CDT. I have a make file setup which is nice, but I'd like IDE integration with the error / warning output of my compiler.

有谁知道什么步骤,我可以写一个解析/支持我的编译器输出的插件吗?我想这应该很容易,但有搞清楚哪里开始的进入障碍。将是很好,如果Eclipse中愿意让我做新 - >编译器错误解析器插件,或者类似的东西。

Does anybody know what steps I can take to write a plugin for parsing / supporting my compilers output? I think it should be easy but there is a barrier of entry of figuring out where to start. Would be nice if Eclipse would let me do New -> Compiler Error Parser Plugin, or something like that.

感谢

推荐答案

在Eclipse CDT的7.0.1是pretty简单。只需添加一个新的错误解析器
窗口 - > preferences - > C / C ++编译 - >设置
并加入常规的前pression与3组:文件名,行号和错误的描述

In Eclipse CDT 7.0.1 it's pretty simple. Just add a new error parser under Window -> Preferences -> C/C++ Build -> Settings and add regular expression with 3 groups: filename, linenumber and error description.

例如,为Visual Studio编译器的正则表达式将是:

For example, for Visual Studio compiler regexp will be:

(.*?)\((\d*)\)\s:\s(.*error.*)

$1 - filename
$2 - line number
$3 - error description

这篇关于Eclipse CDT的自定义编译器错误解析插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆