Eclipse - Builder 到底是什么?

发布于 2024-08-20 14:03:29 字数 212 浏览 5 评论 0原文

我不明白CDT中的构建器到底是什么,与“C/C++ Build”内容有什么关系。

我在“C/C++ Build”配置中设置了SCons。它确实有效:我做了两个配置(发布和调试),并且启动了我的 SCons 脚本。但当我现在尝试调试时,我正在研究这些 Builders stauuf(我正在发现 Eclipse...)。

文档对于这一点根本不清楚。

感谢您的帮助。

I don't understand what is exactly a builder in CDT, and what is the relationship with the "C/C++ Build" content.

I set up SCons in the "C/C++ Build" confuguration. It does work : I made two configurations (release and debug), and my SCons scripts are launched. But as I try now to debug, I am studying these Builders stauuf (I am discovering Eclipse...).

The documentation is not clear at all about this point.

Thanks for help.

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

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

发布评论

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

评论(1

≈。彩虹 2024-08-27 14:03:29

我不太确定您的问题是什么,但我会尝试解释构建器的工作原理。

任何 Eclipse 项目都有零个或多个构建器,并且在 Eclipse 构建项目时(按顺序)调用它们。有不同类型的构建器可以执行不同的操作,例如调用外部构建工具或验证 XML 文件。如果需要,您可以定义自己的构建器。

CDT 项目通常有两个构建器。第一个是 CDT 构建器,负责编译代码。如果您使用外部构建工具,则很可能使用“makefile 项目”,在这种情况下,CDT 构建器只需为您调用构建工具。默认情况下称为“make”,但您可以在项目设置中更改它。

第二个构建器是“扫描仪发现”构建器。此构建器的目的是尝试找出用于索引器的包含路径等,以便自动完成功能正常工作等。如果您使用外部工具,您可能需要自己设置这些工具在“路径和符号”选项卡下。

调试时,构建器通常不参与,但如果构建系统没有将编译的二进制文件放在 CDT 期望的位置,您可能会遇到麻烦。项目属性中应该有一个选项卡,您可以在其中配置 CDT 查找二进制文件的方式/位置。

I'm not exactly sure what your problem is, but I'll try to explain how builders work.

Any Eclipse project has zero or more builders, and they are invoked (in order) when Eclipse builds a project. There are different kinds of builders which do different things, such as invoking an external build tool or validating an XML file. You can define your own builders if you want.

A CDT project typically has two builders. The first one is the CDT builder which is responsible for compiling your code. If you are using an external build tool you are most likely using a "makefile project", in which case the CDT builder simply invokes your build tool for you. This is by default called "make", but you can change it in the project settings.

The second builder is the "scanner discovery" builder. The purpose of this builder is to try to figure out which include paths etc. to use for the indexer so that auto-completion will work, etc. If you are using an external tool, chances are that you will need to set up these yourself under the "Paths and Symbols" tab.

Builders are in general not involved when debugging, but you may run into trouble if the build system doesn't put the compiled binaries in a place where CDT expects. There should be a tab in the project properties where you can configure how/where CDT looks for binaries.

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