nafxcw.lib / nafxcwd.lib有什么用? [英] What is the use of nafxcw.lib/nafxcwd.lib?

查看:107
本文介绍了nafxcw.lib / nafxcwd.lib有什么用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

*我对源代码一无所知*

i有一个项目,其中nafxcw.lib和其他一些库被添加到链接器库依赖项中。当我将该项目从vs2008转换为vs2017,2017年生成的exe的大小从大约1700 kb变为大约4000 kb。(我正在考虑发布而不是调试)。


当我删除nafxcw时
.lib来自链接器依赖,大小减少到大约2000kb。

如果我链接这个lib的大小增加,如果我删除大小减少。在这两种情况下生成的exe工作正常。

i不明白如果没有使用那个lib为什么exe的大小会增加?



我试过的:



i不明白如果没有使用那个lib为什么exe的大小会增加?

*I dont know anything about the source code*
i have a project in which nafxcw.lib along with some other libs are added into linker library dependencies.when i am converting that project from vs2008 to vs2017,the size of exe generated in 2017 is changed from around 1700 kb to around 4000 kb.(i am taking about release not debug).

when i removed nafxcw.lib from linker dependencies,the size got reduced to around 2000kb.
If i am linking this lib the size getting increased and if i removing the size getting reduced.In both cases the generated exe is working fine.
i dont understand if there is no use of that lib why the size of exe in increasing?

What I have tried:

i dont understand if there is no use of that lib why the size of exe in increasing?

推荐答案

您正在从旧版本的编译器和库迁移到更新的m版本矿石功能,所以尺寸几乎可以保证增加。
You are moving from an old version of the compiler and libraries to a newer one with more functionality, so the size is almost guaranteed to increase.


NAFXCW是静态MFC库。如果在项目设置中指定,那么该库中使用的函数的代码将被复制到您的应用程序并增加大小。



当没有链接时库,这些函数由MFC DLL提供。



但是,通常不需要在项目设置中指定静态库。请改用相应的项目属性。



因为您已将项目从2008年转换为2017年并且看到了大幅增加,所以看起来该库已被遗留在2008年忽略该条目并使用DLL的设置中,2017年尊重设置并链接它。
NAFXCW is the static MFC library. If you specify that in the project settings, the code of the used functions from that library will be copied to your application and increase the size.

When not linking with that library, the functions are provided by the MFC DLLs.

However, there is usually no need to specify the static library in the project settings. Use the corresponding project property instead.

Because you have converted the project from 2008 to 2017 and saw a large increase in size, it looks like the library has been left over in the settings where 2008 ignores the entry and uses the DLLs while 2017 respects the settings and links it.


这篇关于nafxcw.lib / nafxcwd.lib有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆