LIBRARY_PATH is
used by gcc before compilation to search for directories containing libraries that need to be linked to your program.
LD_LIBRARY_PATH is
used by your program to search for directories containing the libraries after it has been successfully compiled and linked.
本文解释了GCC在编译过程中如何使用LIBRARY_PATH搜索库文件,以及程序运行时如何通过LD_LIBRARY_PATH查找库。重点阐述了两个环境变量在不同阶段的作用。
5万+

被折叠的 条评论
为什么被折叠?



