无法编译项目,缺少 io.h 文件

我无法为具有 Windows Mobile(基于 Windows CE)操作系统的移动设备编译 C++ 项目,并且 Visual Studio 中的 Visual C++ 编译器失败并显示:

I fail to compile a C++ project for mobile device with Windows Mobile (Windows CE-based) operating system and Visual C++ compiler from Visual Studio fails with:

Error   1   fatal error C1083: Cannot open include file: 'io.h'

编辑
我正在尝试编译 SQLite 合并,shell.c 文件包含对此 io.h 的调用,但文件中缺少 io.h.

EDIT
I am trying to compile the SQLite amalgamation, the shell.c file includes the call to this io.h but the io.h is missing from the files.

我用谷歌搜索,但找不到如何获取此 .h 文件.

I googled and I couldn't locate how can I get this .h file.

有人能指出正确的方向吗?

Can someone point me in the right direction?

推荐答案

io.h 文件在适用于 Windows Mobile 等基于 Windows CE 的系统的 SDK 中不可用.事实上,io.h 标头从未成为 ISO C 或 C++ 标准的一部分.它定义了属于 Windows NT 上 POSIX 兼容层 的特性,但不属于 Windows CE.

The io.h file is not available in SDKs for Windows CE-based systems like Windows Mobile. In fact, io.h header has never been a part of ISO C nor C++ standards. It defines features that belongs POSIX compatibility layer on Windows NT, but not Windows CE.

由于 Windows CE 缺乏 POSIX 功能,我开发了一个小型实用程序库 WCELIBCEX.确实包括io.h 是一个非常小的版本,对于 SQLite 来说可能不够用.然而,正如 ctacke 提到的,你应该使用 SQLite port for Windows CE 因为原始版本的 SQLite 不适用于此平台.

Due to lack of POSIX features on Windows CE, I developed a small utility library WCELIBCEX. It does include io.h but a very minimal version and which is likely insufficient for SQLite. However, as ctacke mentioned, you should use SQLite port for Windows CE because original version of SQLite is not compilable for this platform.

附言请注意,您的问题没有明确指定您正在为 Windows Mobile 构建.如果没有发现标签中提到的 .NET Compact Framework,那么整个问题就是模棱两可的.

p.s. Note, Your question does not specify explicitly that you're building for Windows Mobile. If one doesn't spot the .NET Compact Framework mentioned in tags, then the whole question is ambiguous.

相关文章