Link statically only some specific libraries to a binary
Posted by mazet on Dec 13 2011 in Programmation, C
You could also use ld options -Bstatic and -Bdynamic
Shell
gcc mixer.o \ | |
-Wl,-Bstatic -lapplejuice \ | |
-Wl,-Bdynamic -lorangejuice \ | |
-o multifruitjuice |
All libraries after it (including system ones linked by gcc automatically) will be linked dynamically.