[英]What is the difference betweend LTDL_LIBRARY_PATH and LD_LIBRARY_PATH?
In compiling and linking C
and C++
code, what is the purpose of LTDL_LIBRARY_PATH
and LD_LIBRARY_PATH
environment variables? 在编译和链接
C
和C++
代码时, LTDL_LIBRARY_PATH
和LD_LIBRARY_PATH
环境变量的目的是什么? In addition what is the difference between them? 另外它们之间有什么区别?
Thanks 谢谢
LTDL_LIBRARY_PATH
sets a library search path for the libtool library , a helper/portability library for using shared libraries. LTDL_LIBRARY_PATH
为libtool库设置库搜索路径, libtool库是一个使用共享库的帮助器/可移植性库。 That library will search the directories in this path before searching LD_LIBRARY_PATH
which is an environment variable that sets a search path for the system's shared library loader. 该库将在搜索
LD_LIBRARY_PATH
之前搜索此路径中的目录, LD_LIBRARY_PATH
是一个环境变量,用于设置系统共享库加载器的搜索路径。
From the libtool documentation : 从libtool文档 :
If
libltdl
cannot find the library and the file name filename does not have a directory component it will additionally look in the following search paths for the module (in the following order):如果
libltdl
找不到库并且文件名filename没有目录组件,它还会在模块的以下搜索路径中查找(按以下顺序):
- user-defined search path: This search path can be changed by the program using the functions
lt_dlsetsearchpath
,lt_dladdsearchdir
andlt_dlinsertsearchdir
.用户定义的搜索路径:程序可以使用函数
lt_dlsetsearchpath
,lt_dladdsearchdir
和lt_dlinsertsearchdir
更改此搜索路径。libltdl
's search path: This search path is the value of the environment variableLTDL_LIBRARY_PATH
.libltdl
的搜索路径:此搜索路径是环境变量LTDL_LIBRARY_PATH
的值。- system library search path: The system dependent library search path (eg on GNU/Linux it is
LD_LIBRARY_PATH
)系统库搜索路径:系统相关的库搜索路径(例如在GNU / Linux上它是
LD_LIBRARY_PATH
)
As mentioned above, LD_LIBRARY_PATH
is an environment variable that the system will use to search for shared libraries. 如上所述,
LD_LIBRARY_PATH
是系统将用于搜索共享库的环境变量 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.