很多时候,我们的.h/.so/.a/bin文件都不在Linux发行版所指定的默认路径下,这时可以通过~/.bashrc来增加搜索路径。
1 #增加.so搜索路径 2 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/liheyuan/soft/lib 3 4 #增加.a搜索路径 5 LIBRARY_PATH=$LIBRARY_PATH:/home/liheyuan/soft/lib 6 7 #增加bin搜索路径 8 export PATH=$PATH:/home/liheyuan/soft/bin 9 10 #增加GCC的include文件搜索路径 11 export C_INCLUDE_PATH=$C_INCLUDE_PATH:/home/liheyuan/soft/include 12 13 #增加G++的include文件搜索路径 14 export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/home/liheyuan/soft/include