如何使用 CDT 配置 Eclipse?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/601777/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:34:09  来源:igfitidea点击:

How to configure Eclipse with CDT?

c++eclipsecygwinmakefileeclipse-cdt

提问by Burkhard

I've been trying to use CDT with Eclipse 3.4 under Windows XP with cygwin.

我一直在尝试在带有 cygwin 的 Windows XP 下将 CDT 与 Eclipse 3.4 一起使用。

What do I need to do, in order to get startet? I used "eclipse-cpp-ganymede-SR1-win32.zip" found on the Eclipse homepage.

我需要做什么才能开始?我使用了 Eclipse 主页上的“eclipse-cpp-ganymede-SR1-win32.zip”。

Edit:

编辑:

The main problem is, that I cannot compile and run the code.

主要问题是,我无法编译和运行代码。

In the run configuration, I tried gcc.exe for the C/C++ Application:

在运行配置中,我为 C/C++ 应用程序尝试了 gcc.exe:

After adding the path of make.exe to my $Path, and starting from scratch, it works perfectly.

将make.exe的路径添加到我的$Path后,从头开始,完美运行。

采纳答案by Burkhard

I finally found. Thanks guys.

我终于找到了。谢谢你们。

After downloading and unpacking "eclipse-cpp-ganymede-SR1-win32.zip", you need to install either Cygwin or MinGW.

下载并解压“eclipse-cpp-ganymede-SR1-win32.zip”后,您需要安装 Cygwin 或 MinGW。

Make sure the compiler (e.g. gcc.exe) and make.exe is on your $Path.

确保编译器(例如 gcc.exe)和 make.exe 在您的 $Path 上。

Start Eclipse and everything should work fine.

启动 Eclipse,一切正常。

回答by JesperE

If you want to use Eclipse/CDT on Windows, you should consider using Wascana Desktop Developer, a CDT distro specially targeting Windows hosts.

如果您想在 Windows 上使用 Eclipse/CDT,您应该考虑使用Wascana Desktop Developer,这是一个专门针对 Windows 主机的 CDT 发行版。

回答by VonC

According the the CDT Downloads page:

根据CDT 下载页面

As a minimum, you need to install the Eclipse Platform Runtime before installing the CDT

在安装 CDT 之前,您至少需要安装 Eclipse Platform Runtime

So adding the CDT Ganymede update siteto your current eclipse 3.4 configuration should be enough for you to install CDT.

因此,将CDT Ganymede 更新站点添加到您当前的 eclipse 3.4 配置应该足以让您安装 CDT。

After that, do you have any error message ?

在那之后,你有任何错误信息吗?

For instance, there can be some eclipse.ini-related issueswhen using this package.

例如,在使用这个包时可能会出现一些与 eclipse.ini 相关的问题

回答by Marcin Gil

For me the package you downloaded worked from start. However I was using it with MinGW instead of Cygwin.

对我来说,您下载的软件包从一开始就有效。但是,我将它与 MinGW 一起使用,而不是 Cygwin。

I am using it also for QT4 development together with QT Integrator.

我还将它与 QT Integrator 一起用于 QT4 开发。

回答by McDowell

I use MinGW, though I note that the documentation says you can use Cygwin. I would have a look through Max Berger's CDT guideto troubleshoot the problem.

我使用 MinGW,但我注意到文档说您可以使用 Cygwin。我会查看Max Berger 的 CDT 指南来解决问题。

回答by cobp

you can install both Cygwin and MinGW in your system. gcc and make available with Mingw seems to be suitable better for native windows build. If the PATH environment is set to paths of Cygwin [and/or] MinGW Eclipse project wizard asks you select one . Either Cygwin or MinGW.

您可以在系统中同时安装 Cygwin 和 MinGW。gcc 并与 Mingw 一起使用似乎更适合本机 Windows 构建。如果 PATH 环境设置为 Cygwin [和/或] MinGW Eclipse 项目向导的路径,则会要求您选择一个 . Cygwin 或 MinGW。

For MingW, you may need to download gdb as well, if you need to debug your application

对于 MingW,如果您需要调试应用程序,您可能还需要下载 gdb