预编译头是来自以前版本的编译器... [英] Precompiled header is from previous version of compiler ...

查看:78
本文介绍了预编译头是来自以前版本的编译器...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下错误





g:\ds_main xxxx \ xepkg0 \ _send.c:致命错误
C1853:'F:\DS_Mainxxxx \ xepkg0.vcxproj \ xepkg0.pch'预编译头文件来自以前版本的编译器,或者预编译头是C ++,你从C使用它(反之亦然)[G:\DS_Main
xxxx \ xepkg0 \xepkg0.vcxproj]





所以,我所做的是在大型代码库中采用了一个项目并将我在网上找到的C库导入其中。当我转换我制作的send.c文件时,到send.cpp我从文件cmath的
库侧得到错误  C2733。





(http://stackoverflow.com/questions/40377194/second-c-linkage-of-overloaded-function-not-allowed-c2733/40387403#40387403)







解决方案

来自不同版本编译器的预编译头文件不兼容。


即使你的代码库很大,也要尝试禁用预编译的头文件。而是将你的东西放在SSD上。


- PA


Hi, i have following error

g:\ds_mainxxxx\xepkg0\send.c : fatal error C1853: 'F:\DS_Mainxxxx\xepkg0.vcxproj\xepkg0.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) [G:\DS_Mainxxxx\xepkg0\xepkg0.vcxproj]

So, what i did is in large codebase took one project and imported C library, which i found online, into it. When i convert send.c file which i made, into send.cpp i get error  C2733 from library side from file cmath.

( http://stackoverflow.com/questions/40377194/second-c-linkage-of-overloaded-function-not-allowed-c2733/40387403#40387403 )


解决方案

Precompiled headers from different versions of the compiler are not compatible.

Even though your codebase is large, try to disable precompiled headers. Instead, put your stuff on a SSD.

-- pa


这篇关于预编译头是来自以前版本的编译器...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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