Friday, October 17, 2008
4:48 AM

Mixed Static and Shared Library Linking with GCC

If you want to link some libraries statically and other dynamically you can use these switches:

-Wl,-Bstatic -lsomelibstatically -Wl,-Bdynamic -lotherlibshared

If you just want to compile it all statically, use LDFLAGS="-static".

0 comments:

Post a Comment