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.
精彩评论