I have encountered a problem about the "Console Window" of the Windows CE Platform. To simplify the question ,I wrote this HelloWorld sample application: I wrote my code like this, build ,run . The behavior is really wired. After "double-clicking the application" , If there is not input/output ,I can not see the "Console Window". After 20 seconds ,I printed "helloworld" then I can see the console. I investigated the "printf()", and I can see this API is from "corecrt.lib" and I can not see the source code. I do not know this is the normal behavior ,or there is something wrong with my Application.
Would you give me any advice please. Anything will be appreciated.
//-----------------------------------------------
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
//After click...there is no window.
Sleep(20000);
//20 seconds later ,a window appears.
printf("HelloWorld!\n");
return 0;
}
//----------------------------------------------
It is expected behavior in WinCE
.
If there is no input/output needed, console will not appear. That means, the application will run silently on double click.
If you need console window to appear, you have to use printf
/scanf
/getchar
etc.