Fatal Error C1094
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Fatal Error C1094.
Zmval1' : command line option is inconsistent with value used to build precompiled header ('-Zmval2')
The value that is passed to /Yc must be the same value that is passed to /Yu (/Zm values must be the same in all compilations that use or create the same precompiled header file).
The following sample generates C1094:
// C1094.h int func1();
And then,
// C1094.cpp
// compile with: /Yc"C1094.h" /Zm200
int u;
int main() {
int sd = 32;
}
#include "C1094.h"
And then,
// C1094b.cpp
// compile with: /Yu"C1094.h" /Zm300 /c
#include "C1094.h" // C1094 compile with /Zm200
void Test() {}
Show: