I started a new project in Visual Studio community latest 17.10 version with the wizard
selected MFC headers as part of the setup.
I downloaded many of the MFC configuration for the latest visual studio 2022 MFC 143 version of all the tool kits under MFC
There is a selection of MFC environmens for each of the visual studio versions and x86 or arm version
– Severity Code Description Project File Line Suppression State Details
– Error (active) E1696 cannot open source file “afxwin.h” MFCApplication1 C:autodesk_devmfcMFCApplication1framework.h 14
– Error (active) E1696 cannot open source file “afxext.h” MFCApplication1 C:autodesk_devmfcMFCApplication1framework.h 15
– Error (active) E1696 cannot open source file “afxdisp.h” MFCApplication1 C:autodesk_devmfcMFCApplication1framework.h 18
– Error (active) E1696 cannot open source file “afxdtctl.h” MFCApplication1 C:autodesk_devmfcMFCApplication1framework.h 23
– Error (active) E1696 cannot open source file “afxcmn.h” MFCApplication1 C:autodesk_devmfcMFCApplication1framework.h 26
– Error (active) E1696 cannot open source file “afxcontrolbars.h” MFCApplication1 C:autodesk_devmfcMFCApplication1framework.h 29
– Error (active) E0260 explicit type is missing (‘int’ assumed) MFCApplication1 C:autodesk_devmfcMFCApplication1ChildFrm.cpp 17
– Error (active) E0020 identifier “CMDIChildWndEx” is undefined MFCApplication1 C:autodesk_devmfcMFCApplication1ChildFrm.cpp 17
– Error (active) E0260 explicit type is missing (‘int’ assumed) MFCApplication1 C:autodesk_devmfcMFCApplication1ChildFrm.cpp 19
– Error (active) E0020 identifier “CMDIChildWndEx” is undefined MFCApplication1 C:autodesk_devmfcMFCApplication1ChildFrm.cpp 19
–
Using Window 10 under x86.
I found a copy of the afx.h file in the visual studio downloads and installation.
All the different build files too.
I first want to get the MFC to load the simple project as an exe so I can see if MFC works
Build started at 11:07 PM…
1>—— Build started: Project: MFCApplication1, Configuration: Debug x64 ——
1>C:Program FilesMicrosoft Visual Studio2022CommunityMSBuildMicrosoftVCv170Microsoft.CppBuild.targets(497,5): error MSB8041: MFC libraries are required for this project. Install them from the Visual Studio installer (Individual Components tab) for any toolsets and architectures being used.
1>Done building project “MFCApplication1.vcxproj” — FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 11:07 PM and took 01.939 seconds ==========
Tried to reset the additional include directory.
There is amountain of options.
DO I need the MFC ATL library too.
What configuration works for the commuity version.
Get missing mFC configuration
intellesense highlights header failure
Cheers
John Keays
john keays is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.