Output from cout or printf in C++ not showing in CodeLite on Windows 7

强颜欢笑 提交于 2020-01-05 12:14:31

问题


Okay, so I have a Windows 7 (64) machine, and I downloaded and installed CodeLite. Although I use Visual Studio just fine, I was looking for an open source alternative for some instructional materials I am preparing.

Every time I run the program, I get a blank console window that pops up. There is never any output from the actual code in the window. I have an associate in another state who experiences the same problem and he's used it for a long time with no problems. If it's an introduced bug in an incremental build or something, that's a pretty big one.

Simple programs: the default Hello World program using printf, and also if I modify it to be more "C++" like (using cout, including iostream, etc.) - these appear to compile but do not output anything to the console.

Any suggestions would be greatly appreciated. I can't find any settings related to setting the standard output device, which you'd think would be set to the console, but I digress.

Thanks again!

J

UPDATE: To reproduce, I just try running the code. Build-->Run and then select "Build and Execute"

UPDATE 2: There is an error apparently in the Build, but it still runs the console. I suppose I need to install some sort of mingw tool?

C:\Windows\system32\cmd.exe /C mingw32-make.exe -j 8 -e -f  Makefile
'mingw32-make.exe' is not recognized as an internal or external command,
operable program or batch file.
====0 errors, 0 warnings==== **

Code:

#include <iostream>
using namespace std;

int main()
{
    cout<<"Hello World!"<<endl;

    return 0;
}

来源:https://stackoverflow.com/questions/35109144/output-from-cout-or-printf-in-c-not-showing-in-codelite-on-windows-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!