cannot open source file “afxwin.h”/“afxext.h”/“afxdisp.h”/“afxdtctl.h”/“afxcmn.h”/afxdisp.h etc

后端 未结 3 1003
无人共我
无人共我 2021-02-20 02:16

I try to ran a previous written MFC c++ code on my visual studio 2015 MFC with multitype MFC library installed.

However, I still have 12 errors here regarding missing f

3条回答
  •  梦谈多话
    2021-02-20 02:58

    For what it's worth. I was getting similar errors after a fresh installation of VS2017. I installed the C++ features from the main installer and created a new project with MFC checked. I assumed "Microsoft Foundation Classes for C++" was installed by this point, but I kept getting these errors. Furthermore, after saving and closing the solution for the first time, VS wouldn't load the project if I opened the solution from the recently used list because dependencies were missing.

    What worked for me

    I opened the solution file directly using VS2017. Finally, VS informed me that "Microsoft Foundation Classes for C++" was not installed and gave me the option to install it. I had previously looked through the installer features and could not find this option.

    EDIT

    Per Vladimir's comment below...

    In 2017 Visual Studio Installer it ["Microsoft Foundation Classes for C++"] is under Modify / Individual Components / SDKs... / MFC and ATL support (x86 and x64)

提交回复
热议问题