Reputation: 1578
I'm getting this error (as title says) with Visual Studio 2019. I have browsed through some other answers here (and elsewhere), but I am actually following the advice that I can find:
/Fp"..\obj\Debug-windows-x86_64\myProject\myProject.pch"
/Yu"pch.h"
Configuration Properties -> C/C++ -> Precompiled Headers has marked the header as enabled, and I have checked that the names match.
But, the precompiled header does not seem to be built (at least I cannot find it in obj/...
directory), and this error persists.
I would rather not disable the precompiled header, but rather get it working properly. Any advice?
Upvotes: 1
Views: 2422
Reputation: 11311
You need to specify /Yc (Create Precompiled Header File)
for your pch.h
file:
Upvotes: 2