making gcc prefer static libs to shared objects when linking?

后端 未结 3 1017
逝去的感伤
逝去的感伤 2020-12-30 23:52

When linking against libraries using the -l option (say -lfoo), gcc will prefer a shared object to a static library if both are found (will prefer

3条回答
  •  -上瘾入骨i
    2020-12-31 00:19

    It's dated, but may work: http://www.network-theory.co.uk/docs/gccintro/gccintro_25.html

    (almost end of the page)

    "As noted earlier, it is also possible to link directly with individual library files by specifying the full path to the library on the command line."

提交回复
热议问题