Console application in C++ for smart devices (WinCE)?
I am new in developing application for WinCE 5.0. I want to start from "Hello world" program or console application. But I couldn't find anything like that or any other sample applications to start from.
I am using Visual Studio 2005. I created new project >> visual C++ >> Win32 smart device project >> console application >> finish.
The project compiles fine. I was trying simple
printf("Hello world");
But When I ran in smart phone 2003 emulator, it showed no output.
I couldn't find a 开发者_如何学JAVAgood tutorial to start from. Please suggest me some good tutorials or sample applications to start from.
Thanks in advance.
What does the log say? That the application has terminated successfully with return code 0x0?
If you did not put anything to stop the application it might be that it runs good and terminates without you noticing it. Try to add a scanf
or Sleep(5000)
after the printf
statement so things will be visible. You can also compile it in debug
mode and put a breakpoint after the printf statement and see the results.
In addition, I am not too familiar with Windows Mobile and its incarnations (smart phone 2003 being one of them), but I am not sure how it handles a printf
. You can try create an MFC application and use the MessageBox
to display your text.
OK. I just tried the two options and there is no CMD windows in Windows Mobile (Smartphone or PocketPC) so the application runs successfully, but prints nothing.
Use the MFC option or deploy your application to a Windows CE 5.0 device emulator image. I have not tried that download myself, but it says that it should save you the hassle of handling Platform Builder. Note that you might be missing some components in the image down the road, but I suppose that for practicing purposes it should suite you just fine.
WinMo/Pocket pC devices have no console, so your output went nowhere. You can always add a console on like PocketConsole.
there is CMD windows in POCKET PC 2003 emulator you can try it using visual basic code
精彩评论