Linking partially static and partially dynamic in GCC
问题 I'm trying to compile a very simple (as simple as hello world) C program using both dynamic and static linking with GCC. I want to know how to do this in general, so my minimal test example is simply trying to link libc as static and libm dynamically. I've come across at least the following other questions regarding the same topic: GCC: static linking only some libraries Static link of shared library function in gcc Some of the answers therein suggest things such as using -Wl,-Bstatic and -Wl