How to build a shared library (.so) without hardcoded full dependency paths?

前端 未结 6 1600
面向向阳花
面向向阳花 2020-12-29 07:37

I need to build two 3rd party shared libraries, so their .so files will be reused by other projects. However, after build one of these libraries contains hardcoded path to a

6条回答
  •  天涯浪人
    2020-12-29 08:15

    Perhaps using the -rpath and -soname options to ld could help (assuming a binutils or binutils.gold package for ld on a recent Linux system)?

提交回复
热议问题