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

时间:2021-01-18 04:06:42

调试程序时出现以下问题: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]。

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

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

及添加如下代码 #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

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

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&colon; &num;error: Please use the &sol;MD switch for &lowbar;AFXDLL builds

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

  9. Error C1189&colon; &num;error: Please use the &sol;MD switch for &lowbar;AFXDLL builds(转)

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

随机推荐

  1. css3 缓动公式

    var easingMap = { "linear": [0.250, 0.250, 0.750, 0.750], "ease": [0.250, 0.100, ...

  2. UI学习笔记---第十二天UITabBarController

    页签视图控制器-UITabBarController   自定义UITabBar     block高级 一.UITabBarController 结构为三层:Tab bar controller v ...

  3. 总结Allegro元件封装&lpar;焊盘&rpar;制作方法&lbrack;修整&rsqb;

    总结Allegro元件封装(焊盘)制作方法 在Allegro系统中,建立一个零件(Symbol)之前,必须先建立零件的管脚(Pin).元件封装大体上分两种,表贴和直插.针对不同的封装,需要制作不同的P ...

  4. Uva11183-Teen Girl Squad&lpar;有向图最小生成树朱刘算法&rpar;

    解析: 裸的有向图最小生成树 代码 #include<cstdio> #include<cstring> #include<string> #include< ...

  5. python学习-序列基本知识

    序列是Python中最基本的数据结构.序列中的每个元素都分配一个数字 - 它的位置,或索引,第一个索引是0,第二个索引是1,依此类推. 用到的主要序列有元组和列表. 先定义一个列表 names=[&q ...

  6. openmp入门总结

    Ref: https://wdxtub.com/2016/03/20/openmp-guide/ 简介 这门课作为 ECE 中少有的跟计算机科学相关的课,自然是必上不可.不过无论是 OpenMP 还是 ...

  7. MySQL的分区、分表、集群

    1.分区 mysql数据库中的数据是以文件的形势存在磁盘上的,默认放在/mysql/data下面(可以通过my.cnf中的datadir来查看),一张表主要对应着三个文件,一个是frm存放表结构的,一 ...

  8. ME5xN&lpar;x&colon;1-2&rpar;&colon; custom column is editable in Subscreen Item but not in ALV grid

    FM MEMFS_BUILD_MAPPING_PO_VIEWS->LMEMFSF0Z enhancement 14 zenhance_alvg_rid_editable. "activ ...

  9. MySQL学习笔记-cache 与 buffer

    Cache和Buffer是两个不同的概念,简单的说,Cache是加速"读",而 buffer是缓冲"写",前者解决读的问题,保存从磁盘上读出的数据,后者是解决写 ...

  10. 8 个不常见但很有用的 Git 命令

    1. 拉取远程代码并且覆盖本地更改 2. 列出远程和本地所有分支 3. 强制更新远程分支 4. 回滚一个 merge 5. 修改之前的提交记录或者很久前提交的记录 6. 使用多个远程代码库,并且使用多 ...