Have you perhaps changed the setting for one configuration (DEBUG), and not the other (RELEASE)?
"C1010: Unexpected end of file" occurred even after disabling precompiled header (VC++2019)

I compiled and got error:
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
According to lots of answers found from web, I know the precompiled headers can be disabled from project and file properties, I did it (disabled precompiled headers from project and file), but I still got such error message. How come?
2 additional answers
Sort by: Most helpful
-
Stan Huang 421 Reputation points
2021-01-26T02:06:01.597+00:00 I found there are three items at the configuration: Debug, Release, and Active(Release). The currently selected one is 'Debug'. Is anything wrong here?
-
Stan Huang 421 Reputation points
2021-01-26T03:33:31.477+00:00 I changed the configuration (debug) to consistent with the one at toolbar, rebuilt it. It worked then.