MFC 错误

来源:互联网 发布:手机桌面软件排行 编辑:程序博客网 时间:2024/06/10 10:02
fatal error C1189: #error:  Please use the /MD switch for _AFXDLL builds

原因是静态/动态链接库不统一导致。

1、先在常规=>MFC使用中,选择<在静态库中使用 MFC>


另外vs2015编译出来的exe需要在xp运行的话,需要设置平台工具集为:
Visual Studio 2015 - Windows XP (v140_xp)


MT:MultiThread(static link)         libcmt.lib
MD:MultiThread(dynamic link)    msvert.lib

需要配合静态/动态链接MFC的编译而已。


0 0
原创粉丝点击