静态库的好处 [英] The static library benefits
问题描述
你好,
在VS2005中,如果APP A使用的是静态库B.lib,虽然
是B.lib中包含的很多对象,但App只使用它的一部分,
编译器是否只采用了App实际需要的部分,或者
将B.lib的所有对象绑定到App中? />
App A --B.lib
6月26日上午10:25 ,sealo< seah ... @ gmail.comwrote:
你好,
在VS2005中,如果APP A使用静态库B.lib,虽然那里有
是B.lib中包含的很多对象,但App只使用它的一部分,
编译器只会采用该部分的App实际需要,或者
将B.lib的所有对象绑定到应用程序中?
App A --B.lib
后来,我在VS中测试它
App A --B.lib --C.lib
然后我在App A中调用C.lib函数ks。
它批准,B.lib包含C.lib的所有方法。但是否
App A包含B和C.lib的所有方法未知。
在VS2005中,如果APP A正在使用静态库B.lib,虽然有
是B.lib中包含的很多对象,但App只使用它的一部分,
编译器是否只采用了App实际需要的部分,或者
将B.lib的所有对象绑定到App中?
只有已使用的部分包含在最终的应用程序中。
(它还取决于如何在模块中组织lib)。 />
-
Mihai Nita [微软MVP,Windows - SDK]
http://www.mihai-nita.net
------------------- -----------------------
将_year_替换为_以获取真实的电子邮件
6月26日下午3:30,Mihai N. < nmihai_year_2 ... @ yahoo.comwrote:
在VS2005中,如果APP A使用静态库B.lib,虽然B.lib中包含很多对象,但是应用程序只使用它的一部分,
编译器只采用了应用程序实际需要的部分,或者
将B.lib的所有对象绑定到App中?
只有最终应用程序中包含已使用的部分。
(它还取决于如何在模块中组织lib)。 />
-
Mihai Nita [微软MVP,Windows - SDK] http://www.mihai-nita.net
- -----------------------------------------
替换_year_用_来获取真实的电子邮件
B.lib将包含C.lib的所有功能,即使没有
app使用B.lib。对吗?
Hello,
In VS2005, if APP A is using a static library B.lib, although there
are many objects contained in the B.lib, but App only use part of it,
will the compiler only adopted the part that the App actually need, or
bind all the objects of B.lib into the App?
App A --B.lib
On Jun 26, 10:25 am, sealo <seah...@gmail.comwrote:Hello,
In VS2005, if APP A is using a static library B.lib, although there
are many objects contained in the B.lib, but App only use part of it,
will the compiler only adopted the part that the App actually need, or
bind all the objects of B.lib into the App?
App A --B.libLater, I test it in the VS
App A --B.lib --C.lib
Then I call C.lib function in App A, it works.
It approve that, B.lib contain all the method of C.lib. But Whether
App A contain all the method of B and C.lib is unknown.
In VS2005, if APP A is using a static library B.lib, although thereare many objects contained in the B.lib, but App only use part of it,
will the compiler only adopted the part that the App actually need, or
bind all the objects of B.lib into the App?Only the used part is contained in the final application.
(it also depends how the lib is organized in modules).
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
On Jun 26, 3:30 pm, "Mihai N." <nmihai_year_2...@yahoo.comwrote:In VS2005, if APP A is using a static library B.lib, although there
are many objects contained in the B.lib, but App only use part of it,
will the compiler only adopted the part that the App actually need, or
bind all the objects of B.lib into the App?
Only the used part is contained in the final application.
(it also depends how the lib is organized in modules).
--
Mihai Nita [Microsoft MVP, Windows - SDK]http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real emailThe B.lib will include all the functions of C.lib, even there are no
app use B.lib. Right?
这篇关于静态库的好处的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!