Mac OS DYLD_LIBRARY_PATH 环境变量说明

    今天在MacBook上编译Hadoop,看到文章说要先安装protobuff,不知道安装这东东做什么(难道用来这个数据交换格式?待研究),在编译安装protobuff后,要配置DYLD_LIBRARY_PATH环境变量,这是个啥,与Linux下的LD_LIBRARY_PATH相同吗,对Mac OS仍是了解太少啊,查了一些Apple的开发网站,对这个变量定义以下,在此记之,以待后查。oop

DYLD_LIBRARY_PATH

This  is  a  colon  separated  list  of directories that contain libraries. The dynamic linker  searches these directories before it searches the default locations for libraries.  It  allows you to test new versions of existing libraries. For  each  library  that  a program uses, the dynamic linker looks for it in each directory in  DYLD_LIBRARY_PATH in turn. If it still can't find the library,  it  then  searches BACK_FRAMEWORK_PATH and DYLD_FALLBACK_LIBRARY_PATH in turn.
 
此环境变量为一个分号分割的目标列表,动态连接器查找所调用的动态库时,在默认动态库位置前,首先查找这些目录。其容许测试已存在库的新版本。对于程序使用的每个动态库,动态连接器循环查找此环境变量(DYLD_LIBRARY_PATH)保护的每个目录,若是仍没有发现,链接器将循环查找
BACK_FRAMEWORK_PATH and DYLD_FALLBACK_LIBRARY_PATH 环境变量包含的路径。