“你好世界”运行失败。 Windows Vista 上的 Eclipse (Galileo) CDT 插件与 MinGW 和 Cygwin 的问题

发布于 2024-10-04 09:19:06 字数 588 浏览 0 评论 0原文

尝试在 Windows Vista 上的 Eclipse (Galileo) CDT 插件上运行简单的 Hello World C++ 程序。遵循 Eclipse/CDT 的“开始之前”说明...

1) 下载并安装最新的 Cygwin。但是,无法使用 Cygwin 进行编译。

内部生成器:无法运行程序“g++”:启动失败

Eclipse CDT 文档说...

目前不支持 Cygwin >= 版本 3.4.4-999,因为 gcc 和 g++ 命令无法 >从 Windows 的本机 shell 启动

这似乎是一个拼写错误(Cygwin 版本为 1.7.7),但正在运行 cygcheck -c ,我得到的 g++ 版本是 3.4.4.x。 因此我假设这个版本的 g++ 不能从命令行运行。所以放弃了Cygwin。

2)下载并安装MinGW、gdb、MSYS。 这次,它能够编译,但是当尝试运行时,我收到一个弹出窗口,说

Hello.exe 程序已停止工作

Trying to run a simple Hello World C++ program on Eclipse (Galileo) CDT plugin on Windows Vista. Following the "Before You Begin" instructions for Eclipse/CDT...

1) Downloaded and installed the latest Cygwin. However, could not compile with Cygwin.

Internal Builder: Cannot run program "g++": Launching failed

the Eclipse CDT docs say...

currently Cygwin >= version 3.4.4-999 is not supported since gcc and g++ commands cannot >be launched from the windows' native shell

It seems to be a typo (Cygwin version is at 1.7.7) but running cygcheck -c, I get the version of g++ which is 3.4.4.x.
Hence I assumed that this version of g++ cannot be run from the command line. So gave up on Cygwin.

2) Downloaded and installed MinGW, gdb, MSYS.
This time, it was able to compile, but when trying to run, I get a popup saying that

the program Hello.exe has stopped working

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

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

发布评论

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

评论(2

梦途 2024-10-11 09:19:06

您应该使用 Cygwin 或 Mingw,因为如果它们都可以通过 %PATH% 发现,则它们的 dll 可能会发生冲突。
显示您的构建过程(从构建控制台复制粘贴文本)和%PATH%内容。

You should use either Cygwin, or Mingw, because their dll's might conflict if they're both discoverable via %PATH%.
Show your build process (copypaste text from your build console) and %PATH% contents.

信仰 2024-10-11 09:19:06

最简单的解决方案是安装最新的 Eclipse (Helios SR1) 和 CDT 插件。
我还需要删除旧项目/将旧源导入新项目。

对于伽利略,请参阅:
http://sourceware.org/ml/cygwin/2010-03/msg00510.html
http://dreamlayers.blogspot.com/2010/01/eclipse-incompatibility-with-cygwin-17.html

The simplest solution was to install the latest Eclipse (Helios SR1) and the CDT plugin.
I needed to also delete the old projects/import old source into new projects.

For Galileo, see:
http://sourceware.org/ml/cygwin/2010-03/msg00510.html
http://dreamlayers.blogspot.com/2010/01/eclipse-incompatibility-with-cygwin-17.html

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