环境:win7,64位,vs2012

1> c:/program files/microsoft visual studio 8/vc/atlmfc/include/afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

原因:

常规里面是静态mfc,

多线程调试是MDd(多线程动态调试)

解决:将MDd改成MTd

ps:

如果是Debug的“在静态库中使用MFC”,不要使用MDd,改用MTd,然后编译即可通过。

如果是Debug的“在共享DLL中使用MFC”,注意不要使用MTd,改用MDd;

如果是Release版本“在静态库中使用MFC”,不要使用MD,使用MT;

如果是Release版本的“在共享DLL中使用MFC”,不要使用MT,使用MD。

vc/atlmfc/include/afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT的更多相关文章

  1. fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC sha

    调试程序时出现以下问题:d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): fatal e ...

  2. fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC

    出现如下错误: fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires ...

  3. #error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

    转载:https://www.cnblogs.com/cvwyh/p/10570920.html 错误 在使用VS编译文件时出现了如下错误: #error: Building MFC applicat ...

  4. VS2017编译错误:#error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version

    VS2017编译错误:#error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll ve ...

  5. error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

    今天在开发过程中遇到了C1189 error.找了好久解决办法,最后自己解决了...... 方法:工程右键->属性 编辑预处理器定义: 再次运行,就解决了.

  6. 错误 88 error C2248: “CObject::CObject”: 无法访问 private 成员(在“CObject”类中声明) c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxcoll.h 590

    最近接收了以前新公司遗留的代码,一个函数动不动就少的一千行,多的几千行,真是受不了这编码风格! 于是便使用了VS自带的重构工具,选择代码后右键-重构-提取方法,提取完方法就编译不过,想了好久原因,原来 ...

  7. afx.h(78): fatal error C1083: 无法打开包括文件: “new.h”: No such file or directory

    vs2015新建mfc工程,编译错误: D:\program files (x86)\microsoft visual studio 14.0\vc\atlmfc\include\afx.h(78): ...

  8. 从“空项目”创建MFC项目遇到的问题error C1189,error MSB8031

    在VS2013中创建了一个空项目,创建了MyApp.h, MyApp.cpp(MyApp.h使用了<afxwin.h>) build的时候报错: fatal error C1189: #e ...

  9. Error C1189: #error: Please use the /MD switch for _AFXDLL builds

    在VS 2013中编译程序时出现错误: 错误提示1: error C1189: #error : Building MFC application with /MD[d] (CRT dll versi ...

随机推荐

  1. AcWing 233. 换教室 (期望DP+floyd)打卡

    题目:https://www.acwing.com/problem/content/235/ 题意:有n个时间段,这个时间段有两个地方授课ci,di,最开始是在ci,可以申请去di,但是是几率的,然后 ...

  2. centos 安装 Lamp(Linux + Apache + PHP) 并安装 phpmyadmin

    来源:http://www.laozhe.net/302.html 一般情况下,安装的都是最新的正式版,除非你有特殊需求,要安装指定的版本,本文暂不讨论.从最基础的开始,一点点完成一个可用的 Linu ...

  3. IOS 创建目录/文件夹

    •IOS 应用目录简介 个文件夹:Documents, Library和 tmp.Library包含Caches.Preferences目录. Documents:应用中用户数据可以放在这里,iTun ...

  4. Linux用ifconfig设置IP、掩码、网关

    ifconfig eth0 ip netmask 255.255.255.0 route add default gw 网关

  5. Java中Iterator用法整理

    迭代器(Iterator) 迭代器是一种设计模式,它是一个对象,它可以遍历并选择序列中的对象,而开发人员不需要了解该序列的底层结构.迭代器通常被称为“轻量级”对象,因为创建它的代价小. Java中的I ...

  6. python学习笔记:接口开发——PythonWEB框架之Flask

    Flask是一个使用 Python 编写的轻量级 Web 应用框架,安装命令如下 pip install flask 一.服务端接口是怎么开发的? 1.启动一个服务 2.接收到客户端传过来的数据3.登 ...

  7. git的使用(本地版本库)

    1. 创建版本库 1.1 创建一个版本库非常简单,首先,选择一个合适的地方,创建一个空目录: 1.2通过git init命令把这个目录变成Git可以管理的仓库(git进入空目录的路径) $ git i ...

  8. Java8环境设置

    假设你已经安装在 C:Program Filesjavajdk 目录: 在“我的电脑”右键单击并选择“属性”. 在“高级”选项卡下单击“环境变量”按钮. 现在,改变“Path”变量,因此,它也包含了路 ...

  9. mybatis之参数处理

    mybatis的mapper接口需要和mapper映射文件进行关联,上一节已经展示接口方法的返回值是如何和mapper映射文件的resultType进行映射.这一节主要讲解接口方法的参数如何与映射文件 ...

  10. Vue篇1

    2019 Vue 面试题汇总(持续更新中...) 1. vue中的MVVM模式 即Model-View-ViewModel. Vue是以数据为驱动的,Vue自身将DOM和数据进行绑定,一旦创建绑定,D ...