区别:Use MFC In A Shared DLL 和 Use MFC In A Static Library

摘自: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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值