Advertisement

预编译头文件来自编译器的早期版本

阅读量:

1.报错形式

在使用Visual Studio2010进行C++程序开发时,编译过程中出现了错误提示:预编译头文件的版本与当前编译器不兼容,或是预编译头文件为C++类型却在C语言环境下被调用(或相反情况)。

2.解决方法

3.原因分析框架构建

当 Visual C++ 项目中启用了预编译头功能后,若项目中同时包含了 .c 和 .cpp 源文件,则可能会遇到 C1853 编译器错误:fatal error C1853: 'pjtname.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)(致命错误C1853: “filename.pch”预编译头文件来自编译器的早期版本,或者预编译头为C++ 而在C 中使用它(或相反))。
此类错误的出现原因在于,当项目中混合

全部评论 (0)

还没有任何评论哟~