Change in static library used by other static library

流过昼夜 提交于 2020-01-15 12:27:30

问题


I have 2 library files, lib1.a and lib2.a in my project. Lib1.a is using lib2.a . I have given source code of lib2.a but I don't have source code of lib1.a. For my project I changed lib2.a lets say I add a local variable inside a function.

My question, function names didn't changed, do I need to recompile lib1.a with changed lib2.a ? Is there anyway I tell to linker "lib1.a should use new lib2.a" without source code of lib1.a ?


回答1:


If it's just something like an added local variable as you say, there should be no need to rebuild the other library. This is because static libraries don't typically link each other directly, but rather the executable eventually links them all together.



来源:https://stackoverflow.com/questions/15973153/change-in-static-library-used-by-other-static-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!