Eclipse CDT 不解析控制台输出

发布于 2024-10-23 18:51:11 字数 400 浏览 3 评论 0原文

我正在使用批处理文件在 Eclipse 中构建我的项目(我正在使用 Keil 的 C51 编译器)。输出正确显示在 Eclipse Console 视图中,但错误解析器似乎没有执行任何操作。

我已经尝试过内置解析器(尽管我知道我可能必须编写自己的解析器),我已经编写了自己的错误解析器(然后我检查了它是否有效),我什至尝试向现有解析器添加新规则,但没有任何运气。甚至这个正则表达式似乎也不起作用:(.*)

我还尝试过使用 iSystem 中的 RegEx Error Parser;我见过其他人成功地让它发挥作用,但仍然没有发生任何事情。

有没有人有幸让错误解析器正确解释控制台输出?我正在使用 Eclipse CDT 的 Helios Service Release 2

I'm using a batch file to build my project in Eclipse (I'm using the C51 compiler from Keil). The output is correctly displayed in the Eclipse Console view, but none of the error parsers seem to do absolutely anything.

I've tried the built-in parsers (although I knew I'd probably have to write my own), I've written my own error parser (which I've then checked to see if it works), I've even tried adding new rules to the existing parsers, without any luck. Not even this regex seems to work: (.*).

I've also tried using the RegEx Error Parser from iSystem; I've seen others who managed to successfully get it to work, but still nothing happened.

Has anyone had any luck in getting the error parser to correctly interpret the console output? I'm using the Helios Service Release 2 of the Eclipse CDT.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一页 2024-10-30 18:51:11

我找到了解决方案< /a> 在 Eclipse CDT 论坛上交叉发布我的问题后:

错误解析器仅适用于内置构建工具,因此请保留构建器不变。然后,转到 Project ->属性-> C/C++ 构建,取消选择使用默认构建命令并添加您自己的批处理文件。在“行为”选项卡中为“基于资源保存构建(自动构建)”和“构建(增量构建)”选项执行相同的操作。

然后,转到C/C++ Build\Settings 中的Error Parsers 选项卡,并使用所需的规则添加您自己的错误解析器。

I've found the solution after cross-posting my question on the Eclipse CDT forum:

The error parsers only work for the built-in build tools, so leave the builders as they are. Then, go to Project -> Properties -> C/C++ Build, deselect the Use default build command and add your own batch file. Do the same thing in the Behaviour tab for the Build on resource save (Auto build) and the Build (Incremental build) options.

Afterwards, go to the Error Parsers tab in C/C++ Build\Settings and add your own error parser with the rules you want.

左岸枫 2024-10-30 18:51:11

以下更改解决了我的问题:

  1. 将编译器模式更改为: .*((g?cc)|([gc]++)|(clang))
  2. 添加到构建目标“VERBOSE=1”(因为我正在使用 cmake)
  3. 将 –std=C++17 添加到内置编译器设置
  4. 检查索引器中的“索引在编辑器中打开的源文件和头文件”

在此处输入图像描述
输入图片此处描述
输入图片此处描述
输入图片此处描述

The following changes fix problem for me:

  1. Change Compiler pattern in to: .*((g?cc)|([gc]++)|(clang))
  2. Add tobuild target “VERBOSE=1” (because I am using cmake)
  3. Add –std=C++17 to Build-in Compiler settings
  4. Check the "Index source and header files opened in editor" in indexer

enter image description here
enter image description here
enter image description here
enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文