Created
November 22, 2016 12:47
-
-
Save sighingnow/0421b5cd617a5edde9ee72e0942a2bc4 to your computer and use it in GitHub Desktop.
Merge two archive files (.a) into a single one.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## place object files (.o) in two different folders to vaoid overlapping. | |
mkdir libA | |
cd libA | |
ar -x ../libA.a | |
cd .. | |
mkdir libB | |
cd libB | |
ar -x ../libB.a | |
cd .. | |
ar -qc libC.a libA/*.o libB/*.o | |
## optimize new archive library, optional. | |
ranlib libC.a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment