FILE* fp = fopen("CON", "w");
fputs("ABC", fp);
fclose(fp);
fputs("XYZ", stdout);
fputs("DEF", stderr);
OutputDebugString("GHI");
One possible idea is to use the log file to see output. It's not the best UI since it requires extra PyCharm setup and does nothing for the command prompt. Another idea is to have a separate Console launcher that can be used with the command prompt and PyCharm.
This is set using the Linker > System > SubSystem to
/SUBSYSTEM:WINDOWS. However, when doing so, all output to PyCharm is disabled. Need to find a workaround for that.Useful discussions:
Also, none of the following work to output to PyCharm when running as a GUI app:
One possible idea is to use the log file to see output. It's not the best UI since it requires extra PyCharm setup and does nothing for the command prompt. Another idea is to have a separate Console launcher that can be used with the command prompt and PyCharm.