Eclipse CDT using MinGW does not output in console

后端 未结 9 1385
栀梦
栀梦 2020-12-02 11:16

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 min

相关标签:
9条回答
  • 2020-12-02 11:44

    purlogic's solution works. Instead to set that for every project, I found it can be set globally:

    In Window -> Preferences-> C/C++ -> Build -> Environment Add a variable for your compiler. e.g, I added: MINGW, with value "C:\MinGW\bin"

    0 讨论(0)
  • 2020-12-02 11:54

    Have you tried to execute the eclipse.exe with administrator privileges ?? it worked for me !

    0 讨论(0)
  • 2020-12-02 11:55

    This worked for me on 64-bit install of Eclipse on Windows 7 using MinGW:

    Right-click on your project. Select "Properties".

    Select the "Run/Debug Settings" Property on the left of the new window.

    In the right window, click on your executable to highlight (ie - Test.exe) and click "Edit".

    In the Environment tab, hit "New"

    Name: PATH
    Value: Path to your MinGW bin directory. (For me this was: C:\devcore\MinGW\bin)

    Click "OK" on all windows to close down.

    Try running again, it should print output to the screen.

    0 讨论(0)
  • 2020-12-02 11:57

    Add PATH variable (PATH="your MinGW/bin directory path") into your C++ project by Run -> Run Configurations ->in Environment Tab

    0 讨论(0)
  • 2020-12-02 11:59

    You need to set up linker I am using MinGW.

    Follow below steps.

    Goto Project > Properties > C/C++ Build > Settings > Tool Settings (Tab) > MinGW C++ Linker (Option) > Add Command (g++ -static-libgcc -static-libstdc++)   (default command is only g++)
    
    0 讨论(0)
  • 2020-12-02 12:06

    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

    0 讨论(0)
提交回复
热议问题