C++ 中的控制台应用程序对于智能设备(WinCE)?

发布于 2024-09-12 11:38:17 字数 358 浏览 1 评论 0原文

我是 WinCE 5.0 开发应用程序的新手。我想从“Hello world”程序或控制台应用程序开始。但我找不到类似的东西或任何其他示例应用程序可以开始。

我正在使用 Visual Studio 2005。我创建了新项目>>视觉C++>> Win32智能设备项目>>控制台应用程序>>结束。

该项目编译良好。我正在尝试简单的

printf("Hello world");

但是当我在智能手机2003模拟器中运行时,它没有显示任何输出。

我找不到一个好的教程来开始。请建议我一些好的教程或示例应用程序作为起点。

提前致谢。

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 good tutorial to start from. Please suggest me some good tutorials or sample applications to start from.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

风尘浪孓 2024-09-19 11:38:17

日志说了什么?应用程序已成功终止并返回代码 0x0?

如果您没有放置任何东西来停止应用程序,则它可能运行良好并在您没有​​注意到的情况下终止。尝试在 printf 语句后添加 scanfSleep(5000) ,以便内容可见。您还可以在 debug 模式下编译它,并在 printf 语句后面放置断点并查看结果。

此外,我不太熟悉 Windows Mobile 及其版本(智能手机 2003 就是其中之一),但我不确定它如何处理 printf。您可以尝试创建一个 MFC 应用程序并使用 MessageBox 来显示文本。


好的。我刚刚尝试了这两个选项,Windows Mobile(智能手机或 PocketPC)中没有 CMD 窗口,因此应用程序成功运行,但不打印任何内容。

使用 MFC 选项或将应用程序部署到 Windows CE 5.0 设备模拟器 图像。我自己没有尝试过下载,但它说它应该可以让您免去处理 Platform Builder 的麻烦。请注意,您可能会丢失图像中的一些组件,但我认为出于练习目的,它应该适合您。

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.

空名 2024-09-19 11:38:17

WinMo/Pocket PC 设备没有控制台,因此您的输出无处可去。您随时可以添加控制台,例如 PocketConsole

WinMo/Pocket pC devices have no console, so your output went nowhere. You can always add a console on like PocketConsole.

2024-09-19 11:38:17

POCKET PC 2003 模拟器中有 CMD 窗口,您可以使用 Visual Basic 代码尝试一下

there is CMD windows in POCKET PC 2003 emulator you can try it using visual basic code

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文