Over a million developers have joined DZone.

C++/CX : How to Fix the “Precompiled Header File is From a Previous Version of the Compiler” Error


This is just a quick post about this error I sometime have when I change the targeted platform of my C++/Cx project: “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 I read this the first time, I didn’t have a clue of what the error could be. In fact…

.. I think this is a Visual Studio issue and you only have to clean the project once to make everything works on the next build.

Some will maybe think it’s not worth a blog post but I tried a lot of things (and wasted a lost of time – including not watching the last walking dead !!!) before to find out it was this easy. I hope this post will save you this time.

Have fun !

PS: the error code is “C1853″


Published at DZone with permission of Jon Antoine, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}