views:

401

answers:

2

Hi, 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.

A: 

Do you have "Allocate console" checked in your run configuration? What about "Launch in background" checkbox?

PF4Public
Yes, both are checked.FYI I am now using Code::Blocks, it works fine.
Guillaume
A: 

Hi, It does not work for myself either if I run the C++ version of the hello world example. If I run the c example I get the message on the output console in Eclipse. Also if I run the the c++ version of the hello world in an external shell, it works. It seems that there is a problem with the Eclipse console.

  • Win 7 64 bits
  • MinGW
  • Eclipse
  • 3.6
  • CDT 7.0.1
  • g++ 4.5.0

Any idea?

Thanks

Alain

amarchan