Friday, February 6, 2009

GCC: linking with static and dynamic libraries

How to link compile with static and dynamic libraries :
gcc a.o -Wl,-Bstatic -lfoo -Wl,-Bdynamic -lbar
this will link libfoo.a staticly, and libbar.so dynamicly.

No comments: