How to link to a different libc file?

后端 未结 2 379
故里飘歌
故里飘歌 2020-12-03 18:34

I want to supply the shared libraries along with my program rather than using the target system\'s due to version differences.

ldd says my program uses

2条回答
  •  借酒劲吻你
    2020-12-03 19:12

    Passing -nodefaultlibs or -nostdlib to gcc will tell it to not pass the default libraries as arguments to ld. You will then be able to explicitly specify the libc you want to link against. See the gcc(1) man page for more details and caveats regarding both options.

提交回复
热议问题