I have mixed C++ project (managed and unmanaged). The unmanaged is using lots of libraries such as boost. They are all included in the stdafx.h file. I am trying to have two separate precompiled headers, one managed (stdafx.h) and one for unmanaged (stdafxManaged.h). How ever when I include the stdafxManaged.h from my Managed code I get an error saying:
error C2855: command-line option '/clr' inconsistent with precompiled header
So I turn the Common Language RunTime Support (/clr) on for the stdasfManaged.cpp and get the following error:
error C1852: 'Debug\xxx.pch' is not a valid precompiled header file
Where xxx is the name of the project and it shows as an error for all of the unmanaged .cpp files in the project.
Does anyone know how to fix this error or have any link to a tutorial which tells you how to setup multiple precompiled headers for a mixed code?