使用MinGW的Eclipse CDT不会在控制台中输出 [英] Eclipse CDT using MinGW does not output in console
问题描述
对于g ++ ,make和gdb我根据本教程安装了msys和mingw:
http://wiki.wxwidgets这个版本是:
- make:GNU make 3.81
- g ++:4.5.0
- gdb:7.1
所以它应该与我的64位CPU兼容。
然而,当我尝试运行一个非常简单的程序与eclipse,我在控制台上看不到任何东西源代码是:
#include< iostream>
使用namespace std;
int main()
{
int i;
cout<<< 输入一个整数:<< ENDL;
cin>>一世;
cout<<< endl< i is<< i< ENDL;
return 0;
}
构建很好,当我使用命令启动.exe(Windows控制台)行为是如预期的。
但是使用Eclipse控制台,我看不到任何运行和调试输出只是:
输入一个整数:,然后当我输入一个数字,然后输入它什么都不做。
有谁知道如何解决这个问题?
谢谢,
Guillaume
PS:我使用工具链Linux GCC,MinGW GCC我在控制台中根本没有。
这个控制台错误已经在64位版本的eclipse中被注意到:
http://www.eclipse.org /forums/index.php?t=msg&th=197552&start=0&S=2a2b64e1f1404705c0214976bd477428
解决方法是安装32位eclipse
I have a Windows 7 64-bit PC and I am trying to install a free C++ IDE, so I chose to install Eclipse Helios with CDT.
For g++, make and gdb I installed msys and mingw according to this tutorial: http://wiki.wxwidgets.org/HowTo:_Install_MSYS_and_MinGW_for_use_with_Eclipse_CDT
The versions are:
- make: GNU make 3.81
- g++: 4.5.0
- gdb: 7.1
So it should be compatible with my 64-bit CPU.
However when I try to run a very simple program with eclipse, I see nothing on the console. The source code is:
#include <iostream>
using namespace std;
int main()
{
int i;
cout << "Enter an integer: " << endl;
cin >> i;
cout << endl << "i is " << i << endl;
return 0;
}
The build is fine and when I launch the .exe with command (windows console) the behavior is as expected. But with the Eclipse console I see nothing with run and with debug the output is just: "Enter an integer: ", then when I type in a number and hit enter it does nothing.
Does anyone know how to fix this please?
Thanks,
Guillaume
PS: I use the toolchain "Linux GCC", with "MinGW GCC" I have nothing at all in the console.
This console bug has been noticed in 64-bit versions of eclipse:
http://www.eclipse.org/forums/index.php?t=msg&th=197552&start=0&S=2a2b64e1f1404705c0214976bd477428
A workaround is to install the 32-bit eclipse
这篇关于使用MinGW的Eclipse CDT不会在控制台中输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!