how to force linker to use shared library instead of static library?

后端 未结 2 426
没有蜡笔的小新
没有蜡笔的小新 2020-12-31 02:54

This is a quote from Linux programming book:


% gcc -o app app.o -L. –ltest

Suppose that both libtest.

2条回答
  •  梦谈多话
    2020-12-31 03:34

    from the man :

    -shared-libgcc
    -static-libgcc
    On systems that provide libgcc as a shared library, these options force the use of either the shared or static version respectively. If no shared version of libgcc was built when the compiler was configured, these options have no effect.

    good luck

提交回复
热议问题