C_INCLUDE_PATH,LIBRARY_PATH,LD_LIBRARY_PATH(转)
来源:互联网 发布:windows bat脚本 cd 编辑:程序博客网 时间:2024/05/17 04:11
利用系统的环境变量。
对于头文件的搜索路径:
C_INCLUDE_PATH=<your include path>;
export C_INCLUDE_PATH
对于库文件的搜索路径:
LIBRARY_PATH=<your lib path>;
export LIBRARY_PATH
对于链接程序ld使用的库文件搜索路径:
LD_LIBRARY_PATH=<your ldlib path>;
export LD_LIBRARY_PATH
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.
EDIT:As pointed below, your libraries can be static or shared. If it is static then the code is copied over into your program and you don't need to search for the library after your program is compiled and linked. If your library is shared then it needs to be dynamically linked to your program and that's when LD_LIBRARY_PATH comes into play.
- C_INCLUDE_PATH,LIBRARY_PATH,LD_LIBRARY_PATH(转)
- C_INCLUDE_PATH,LIBRARY_PATH,LD_LIBRARY_PATH(转)
- C_INCLUDE_PATH,LIBRARY_PATH,LD_LIBRARY_PATH
- C_INCLUDE_PATH LIBRARY_PATH LD_LIBRARY_PATH 环境变量
- C_INCLUDE_PATH,LIBRARY_PATH,LD_LIBRARY_PATH
- 关于 LIBRARY_PATH 和 LD_LIBRARY_PATH
- LIBRARY_PATH和LD_LIBRARY_PATH
- LD_LIBRARY_PATH vs LIBRARY_PATH
- C_INCLUDE_PATH,CPLUS_INCLUDE_PATH和LIBRARY_PATH的用法
- C_INCLUDE_PATH,CPLUS_INCLUDE_PATH和LIBRARY_PATH的用法
- LIBRARY_PATH和LD_LIBRARY_PATH的区别
- gcc LD_LIBRARY_PATH和LIBRARY_PATH区别
- LIBRARY_PATH 和 LD_LIBRARY_PATH 的关系
- LIBRARY_PATH和LD_LIBRARY_PATH的区别
- gcc 编译unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE
- LIBRARY_PATH和LD_LIBRARY_PATH环境变量的区别
- LIBRARY_PATH和LD_LIBRARY_PATH环境变量的区别
- LIBRARY_PATH和LD_LIBRARY_PATH环境变量的区别
- ubuntu下部署snmpd,并允许远程访问
- Java安装配置
- platform_device和platform_driver
- 智能视频qq群
- Download a report to excel with format (border, color cell, etc)
- C_INCLUDE_PATH,LIBRARY_PATH,LD_LIBRARY_PATH(转)
- 2011.7.8 完全卸载Oracle操作方法
- 大端模式与小端模式、网络字节顺序与主机字节顺序
- opencv2.3在VS2010下的配置
- 获得目录下所有文件名
- .net一个好用的时间控件My97DatePicker
- MOSS2010与MOSS2007区别
- 我国传统思想养生100条
- OLAP技术中的ROLAP,MOLAP,HOLAP三者区别