码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2015-07-02 19:14:42      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:

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

标签:

原文地址:http://www.cnblogs.com/qrlozte/p/4616774.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!