Fatal error C1189: #error: Building MFC application With/md[d] (CRT DLL version) requires MF

Source: Internet
Author: User
Tags requires visual studio
Workaround:
Project Right-click, Properties---general--Properties----Project defaults, select Use MFC in shared DLLs. Then the compilation appears: Error 1 fatal C1189: #error: WINDOWS.  H already included. MFC apps must not #include <windows.h> C:\Program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\afxv_w32.h 16
How to do it. Your is MFC project, the Framework class header file includes windows.h so there is no need to manually add a header file that contains the
Remove the # include <windows.h> find this in all of your projects including header files:
#include <afx.h>
If so, put this sentence on top of the other include file statements. This is an issue with compiler compilation order.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.