我有一台 Windows 7 64 位 PC,我正在尝试安装免费的 C++ IDE,因此我选择使用 CDT 安装 Eclipse Helios.
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.
对于 g++、make 和 gdb,我根据本教程安装了 msys 和 mingw:http://wiki.wxwidgets.org/HowTo:_Install_MSYS_and_MinGW_for_use_with_Eclipse_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
版本是:
所以它应该与我的 64 位 CPU 兼容.
So it should be compatible with my 64-bit CPU.
但是,当我尝试使用 eclipse 运行一个非常简单的程序时,我在控制台上什么也看不到.源代码为:
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;
}
构建很好,当我使用命令(Windows 控制台)启动 .exe 时,行为符合预期.但是使用 Eclipse 控制台,我看不到运行和调试的输出只是:输入一个整数:",然后当我输入一个数字并按 Enter 时,它什么也不做.
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?
谢谢,
纪尧姆
PS:我使用工具链Linux GCC",而MinGW GCC"在控制台中什么都没有.
PS: I use the toolchain "Linux GCC", with "MinGW GCC" I have nothing at all in the console.
在 64 位版本的 eclipse 中已经发现了这个控制台错误:
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
解决方法是安装 32 位 eclipse
A workaround is to install the 32-bit eclipse
这篇关于使用 MinGW 的 Eclipse CDT 不在控制台中输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
Eclipse 的 Visual Studio Ctrl+Tab 和 Ctrl+Shift+Tab 等效项Eclipse#39;s Visual Studio Ctrl+Tab and Ctrl+Shift+Tab Equivalent(Eclipse 的 Visual Studio Ctrl+Tab 和 Ctrl+Shift+Tab 等效项)
如何防止 Eclipse 在包资源管理器中显示打开的文How to prevent Eclipse from showing the opened file in package explorer(如何防止 Eclipse 在包资源管理器中显示打开的文件)
XML 解析器返回意外的令牌错误和空指针异常XML Parser Returning unexpected token error and null pointer exception(XML 解析器返回意外的令牌错误和空指针异常)
Java 解析 XML 文档给出“Prolog 中不允许的内容&qJava parsing XML document gives quot;Content not allowed in prolog.quot; error(Java 解析 XML 文档给出“Prolog 中不允许的内容.错误)
如何在 Eclipse 中将源附加到 Google Drive API 或“AHow to attach source to Google Drive API or `Android Private Library` in Eclipse(如何在 Eclipse 中将源附加到 Google Drive API 或“Android Pr
Lint:如何忽略“<key>"未翻译成&Lint: How to ignore quot;lt;keygt; is not translated in lt;languagegt;quot; errors?(Lint:如何忽略“lt;keygt;未翻译成lt;语言gt;错误?)