调试程序时出现以下问题:d:\program files (x86)\microsoft visual studio 10.0\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]。

按照提示,作出以下修改:

及添加如下代码 #define _AFXDLL

可是问题没有解决,反而出现以下错误:

1>uafxcwd.lib(afxglobals.obj) : error LNK2001: 无法解析的外部符号 _IID_IWICImagingFactory
1>libcmtd.lib(wincrt0.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用
1>C:\Users\zju\Documents\Visual Studio 2010\Projects\Test1\Debug\Test1.exe : fatal error LNK1120: 2 个无法解析的外部命令

在查阅相关资料后发现:静态链接mfc库的话,那么运行库也得设置成静态链接。 动态链接mfc库,运行库也得设置成动态链接。撤销以前所做修改,做出如下修改:

fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC sha的更多相关文章

  1. 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 ...

  2. 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 ...

  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. 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.找了好久解决办法,最后自己解决了...... 方法:工程右键->属性 编辑预处理器定义: 再次运行,就解决了.

  5. Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version

    解决方法:

  6. vc/atlmfc/include/afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT

    环境:win7,64位,vs2012 1> c:/program files/microsoft visual studio 8/vc/atlmfc/include/afx.h(24) : fa ...

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

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

  8. 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 ...

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

    原文转自 https://www.cnblogs.com/zwh0214/p/6048360.html 在VS 2013中编译程序时出现错误: 错误提示1: error C1189: #error : ...

随机推荐

  1. 边学边体验django

    django菜鸟入门连接:http://www.runoob.com/django/django-template.html 安装以及Demo里面都有. 我边学边在电脑上演示,然后发现一些和实际不一样 ...

  2. ODBC连接到400

    1.首先iSeries Client安装的时候要勾选ODBC , 这样才能找到Driver 2.某个Application是32位上,要用32位路径下的ODBC Administration打开,添加 ...

  3. Druid连接池 属性说明

    1.1 maxActive 连接池支持的最大连接数.一般取值20就可以了,一般把maxActive设置成可能的并发量就行了设 0 为没有限制. 1.2 maxIdle 连接池中最多可空闲maxIdle ...

  4. luogu 4909 [Usaco2006 Mar]Ski Lift 缆车支柱 动态规划

    可以出模拟赛T1? #include <bits/stdc++.h> #define N 5002 #define inf 1000000 #define setIO(s) freopen ...

  5. 蓝牙4.0模块,AT指令集

    一,LED状态 二,蓝牙模块有两种通信模式 1,AT指令模式 2,数据透传模式 三.AT指令程序设计 1.设置模块的名字 void usart3_send_str(char *pbuf) { whil ...

  6. [Luogu] 最大收益

    题面:https://www.luogu.org/problemnew/show/P2647 题解:https://www.zybuluo.com/wsndy-xx/note/1142685

  7. RuntimeException和Exception的区别

    1.java将所有的错误封装为一个对象,其根本父类为Throwable, Throwable有两个子类:Error和Exception. 2.Error是Throwable 的子类,用于指示合理的应用 ...

  8. SpringBoot保存数据报错:could not execute statement; SQL [n/a]; constraint [PRIMARY];nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

    使用SpringBoot做JAVA开发时,用Repository.save();保存数据的时候遇到了报错: could not execute statement; SQL [n/a]; constr ...

  9. Python 自学笔记(五)

    1.布尔值 1-1.概念 定义计算机中的逻辑判断,只有两种结果,True和False. if,while后面的判断条件就是布尔值,只有条件为True的时候才执行. 1-2.数值比较 1-3.数值运算 ...

  10. Flutter移动电商实战 --(15)商品推荐区域制作

    1.推荐商品类的编写 这个类接收一个List参数,就是推荐商品的列表,这个列表是可以左右滚动的. /*商品推荐*/ class Recommend extends StatelessWidget { ...