简体   繁体   中英

Change in static library used by other static library

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM