【发布时间】:2011-03-27 11:23:23
【问题描述】:
我有一台 Windows 7 64 位 PC,我正在尝试安装免费的 C++ IDE,因此我选择使用 CDT 安装 Eclipse Helios。
对于 g++、make 和 gdb,我根据本教程安装了 msys 和 mingw: http://wiki.wxwidgets.org/HowTo:_Install_MSYS_and_MinGW_for_use_with_Eclipse_CDT
版本是:
- make: GNU make 3.81
- g++:4.5.0
- gdb:7.1
所以它应该与我的 64 位 CPU 兼容。
但是,当我尝试使用 eclipse 运行一个非常简单的程序时,我在控制台上什么也看不到。源代码为:
#include <iostream>
using namespace std;
int main()
{
int i;
cout << "Enter an integer: " << endl;
cin >> i;
cout << endl << "i is " << i << endl;
return 0;
}
构建很好,当我使用命令(Windows 控制台)启动 .exe 时,行为符合预期。 但是使用 Eclipse 控制台,我看不到运行和调试的输出只是: “输入一个整数:”,然后当我输入一个数字并按 Enter 时,它什么也不做。
请问有人知道怎么解决吗?
谢谢,
纪尧姆
PS:我使用工具链“Linux GCC”,而“MinGW GCC”在控制台中什么都没有。
【问题讨论】:
-
在 Indigo 32 位上遇到同样的问题; purlogic 的解决方案奏效了。
标签: eclipse console mingw eclipse-cdt