-
rpath 指定
可以在编译时指定,例如g++ -rpath=/your/path:/your/path1
使用
:
分割路径
也可以用 chrpath 修改 -
shell 指定
LD_LIBRARY_PATH
变量 -
配置文件
/etc/ld.so.conf
中指定的动态库搜索路径以及/etc/ld.so.conf.d/文件夹
的配置文件中的内容;
Linux 下指定程序运行时动态库搜索路径
发布时间 2024-01-02 10:12:22作者: drink_crow
rpath 指定
可以在编译时指定,例如
g++ -rpath=/your/path:/your/path1
使用 :
分割路径
也可以用 chrpath 修改
shell 指定 LD_LIBRARY_PATH
变量
配置文件 /etc/ld.so.conf
中指定的动态库搜索路径以及 /etc/ld.so.conf.d/文件夹
的配置文件中的内容;