Build fails on specific cpp file with: fatal error C1853
Posted by Yoni Davidson on 05 December 2017 10:28 AM
After a successful build using IncrediBuild, when modifying one .cpp file and trying to compile it by pressing Ctrl+F7 (Build/Compile of Visual Studio), Visual Studio compiler fails with the following message:
"g:\projects\src\dll\isorbuffer\isorbufi7824.cpp(5): fatal error C1853: '\Projects\Bin\v141\x64\Obj\IsorBuffer\Debug/IsorBuffer.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)."
When successfully building this Solution with Visual Studio -> modifying one .cpp file and trying to compile it by pressing Ctrl+F7 (Build/Compile of Visual Studio) - everything works.
The Visual Studio and IncrediBuild use different toolset (32/64 bit) in their builds.
Make sure that both Visual Studio and IncrediBuild are et with the same toolset (32/64 bit). With IncrediBuild, you can check Agent Setting -> Visual Studio Builds -> Advanced -> "Force 64-bit toolset" checkbox