Rebuild precompiled header
Found the solution myself. I need to set the properties of that .cpp file to not using any pre-compiled header.
The common way to use precompiled headers on windows is
- Include system , third party headers or infrequently changing headers in stdadx.h
- stdafx.cpp usually only includes stdafx.h
- All your project cpp files include stdafx.h as the first header
- Your project header files should not include stdafx.h
To trigger a precompiled header rebuild,
- Modify stdafx.h and do an incremental build
- Or Do a rebuild project