开发者

can i trim some modules from lib when i link it in my Makefile?

for example, i have a lib file named test.a. test.a have three modules: test1.o, test2.o, test3.开发者_运维问答o. i just need modules test1.o, how can i achieve this in my Makefile.

if anybody knows how to trim the test2.o and test3.o modules, please let me know.thanks for the help!


If you are using a static library, only the modules needed will be linked into the executable.

If you use a shared library, the whole of the library will be loaded at runtime, regardless of which functions you use from the library.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜