C ++ Visual Studio编译错误 [英] C++ Visual Studio Compilation error

查看:151
本文介绍了C ++ Visual Studio编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下编译错误

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

fatal error C1189: #error : ERROR: Use of C runtime library internal header file.

我绝对不知道.有人可以给它一些照明吗?

I absolutely have no idea about it. can anyone throw some light on it?

完整错误:

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

C:\Program Files\Microsoft Visual Studio 8\VC\ce\include\crtdefs.h(100) : fatal error C1189: #error : ERROR: Use of C runtime library internal header file. Generating Code...

推荐答案

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

You've probably got crt/src in your include directory search path. The headers in there are used to build the C Runtime - they aren't intended for use in user programs (even though they may have the same names as files that are intended to be included).

如果您查看引起问题的标题,您可能会看到类似以下的内容:

If you look in the header that's causing the problem, you'll probably see something like this:

/* 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.
 */

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

You need to fix your include search path.

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

I see you have ce/include in your include search path - are you building a WinCE application? If so, your build should be defining _WIN32_WCE to prevent this problem. If not, this directory should not be in the include path.

这篇关于C ++ Visual Studio编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆