问题
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