[compilation] vs2017 MFC error cannot find _mingw.h

In the environment of win10+vs2017, MFC has been installed, but an error will be reported as soon as it is run after creation. The error is "cannot find _mingw.h".
At first I thought it was a problem with MinGW. After checking, I found that the environment variables have been configured, and the basic mingw is also configured, but the version is relatively low, it is the 2013 version, and the computer that can run MFC normally is 2017 (this year may represent part of the content update). I want to download the latest MinGW on the Internet, but found that mingw.org has stopped operating, so I simply deleted the MinGW folder on the C drive, copied a copy from another computer and put it in this location, and it turned out to be able to run directly... Then create a new
MFC Still reported the same error, simply uninstalled VS2017 completely, reinstalled, and the problem was solved. So the problem may be that there are too many VS2017 installations, which lead to errors in opening _mingw.h? (To be honest, I don't know why)

Guess you like

Origin blog.csdn.net/qq_39006214/article/details/116999760