Our code is linking to a number of libraries. I place a compiled libfoo.a into relative directory libs, and write:
g++ mycode -L libs -lfoo
to my surprise, the executable size does not change. So I ran ldd and found that the original library iss still linked dynamically. It's in /usr/lib/xxx
How do I specify that the static library take precedence over the dynamic one in the system libraries?