摘自:Programming Windows with MFC, 2nd Edition

Choosing Use MFC In A Shared DLL minimizes your application's executable file
size by allowing MFC to be accessed from a DLL. If you choose Use MFC In A Static
Library instead, Visual C++ links MFC code into your application's EXE file and the
file size grows considerably. Static linking uses disk space less efficiently than
dynamic linking because a hard disk containing 10 statically linked MFC
applications contains 10 copies of the same MFC library code. On the other hand,
an application that is statically linked can be run on any PC, whether or not the
MFC DLL is present. It's your call whether to link to MFC statically or dynamically,
but remember that if you distribute a dynamically linked EXE, you'll need to
distribute the DLL that houses MFC, too. For a release-build MFC application
created with Visual C++ version 6, that DLL is named Mfc42.dll if the program
uses ANSI characters and Mfc42u.dll if it uses Unicode characters.

区别:Use MFC In A Shared DLL 和 Use MFC In A Static Library的更多相关文章

  1. VS2010/MFC编程入门之二(利用MFC向导生成单文档应用程序框架)

    VS2010/MFC编程入门之二(利用MFC向导生成单文档应用程序框架)-软件开发-鸡啄米 http://www.jizhuomi.com/software/141.html   上一讲中讲了VS20 ...

  2. MFC学习笔记(一): 不用MFC向导如何新建一个MFC程序

    使用Visual Studio新建一个空项目,项目命名为HelloMFC,完成后,打开项目属性页面,将配置属性选项卡中的常规项打开,将其中的MFC的使用属性栏改为:在静态库中使用MFC或者在共享DLL ...

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

  4. #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 ...

  5. 在共享DLL中使用MFC 和在静态库中使用MFC的区别

    使用VS2008,在项目属性中有一项MFC的使用,有三种设置: 1.使用标准Windows库 2.在共享DLL中使用MFC 3.在静态库中使用MFC          第一种顾名思义.        ...

  6. c++MFC工程修改在共享DLL中使用MFC为使用标准Windows库的解决办法

    由于创建MFC工程时,默认是在共享DLL中使用MFC,如果将此选项改成使用标准Windows库,会报如下错误 c:\program files\microsoft visual studio 9.0\ ...

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

  8. 在共享DLL中使用MFC

    使用VS2008,在项目属性中有一项MFC的使用,有三种设置: 1.使用标准Windows库 2.在共享DLL中使用MFC 3.在静态库中使用MFC          第一种顾名思义.        ...

  9. WIN32 DLL中使用MFC

    最近用WIN32 DLL,为了方便要用到MFC的一些库,又不想转工程,就网上找了很多方法,发现没有详细的介绍,有的也行不通,现在成功在WIN32 DLL中使用了MFC,记录一下以防以后用到忘记 一.修 ...

随机推荐

  1. C#中使用TCP通信

    TCP通信需要通信双方都在线,所以需要先启动服务端进行监听,客户端才能获得连接,服务端代码: static void Main(string[] args) { TcpClient client = ...

  2. (顺序表应用5.1.1)POJ 3750 小孩报数问题(基本的约瑟夫环问题:给出人数n,出发位置w,间隔数s)

    /* * POJ_3750.cpp * * Created on: 2013年10月30日 * Author: Administrator */ #include <iostream> # ...

  3. 显示器驱动程序 NVIDIA Windows Kernel Mode Driver Version 已停止响应 并且己成功恢复 解决方法

    原文:http://news.160.com/?p=1890 在玩游戏中 经常 出现显示器驱动程序 NVIDIA Windows Kernel Mode Driver Version 已停止响应 并且 ...

  4. T-SQL 之 运行时生成语句

    一.用EXECUTE执行动态命令 EXECUTE命令可以执行存储过程.函数和动态的字符串命令.注意此语句的作用正如前面在介绍批处理时,如果批中的第一条语句是"EXECUTE Proc_nam ...

  5. 利用html5调用本地摄像头拍照上传图片[转]

    利用html5调用本地摄像头拍照上传图片   html5概念啥的就不废话了,不知道的 百度, 谷歌一堆..今天学了学html5中的Canvas结合新增的<video>标签来获取本地摄像头, ...

  6. 算法笔记_134:字符串编辑距离(Java)

    目录 1 问题描述 2 解决方案   1 问题描述 给定一个源串和目标串,能够进行如下操作: 在任意位置上插入一个字符: 替换掉任意字符: 删除任意字符. 写一个程序,实现返回最小操作次数,使得对源串 ...

  7. Event sender

    Sometimes it is convenient to know which widget is the sender of a signal. For this, PyQt4 has these ...

  8. Python 更新dict

    更新dict 对需要更新的key-value 直接赋值即可dict是可变的,也就是说,我们可以随时往dict中添加新的 key-value.比如已有dict:d = { 'Adam': 95, 'Li ...

  9. MySQL数据库和实例简介

    MySQL 单进程多线程,也就是说MySQL实例在系统上表现就是一个进程 该架构类似于SQL Server和Windows版本的Oracle MySQL数据库是由一些列物理文件组成.类似于frm.MY ...

  10. gcc/g++ 命令的常用选项

    gcc/g++ 命令的常用选项使用g++编译CPP文件如果用gcc编译C++源文件时,加以下选项:-lstdc++,否则使用了C++操作的文件编译会出错.假如在程序中用到new delete操作,而不 ...