C++ Visual Studio编译错误

7 c++ visual-studio

我收到以下编译错误

致命错误C1189:#error:错误:使用C运行时库内部头文件.

我绝对不知道.任何人都可以对它有所了解吗?

完整的错误:

C:\ Program Files\Microsoft Visual Studio 8\VC\ce\include\crtdefs.h(100):致命错误C1189:#error:错误:使用C运行时库内部头文件.生成代码......

Mic*_*urr 13

您可能已经crt/src进入了包含目录搜索路径.其中的标头用于构建C运行时 - 它们不适用于用户程序(即使它们可能与要包含的文件具有相同的名称).

如果您查看导致问题的标题,您可能会看到如下内容:

/* This version of the header files is NOT for user programs.
 * It is intended for use when building the C runtimes ONLY.
 * The version intended for public use will not have this message.
 */
Run Code Online (Sandbox Code Playgroud)

您需要修复包含搜索路径.

我看到你ce/include在include搜索路径中有 - 你在构建一个WinCE应用程序吗?如果是这样,您的构建应该定义_WIN32_WCE以防止此问题.如果不是,则此目录不应位于包含路径中.