注:

1:LIBRARY_PATH环境变量用于在程序编译期间查找动态链接库时指定查找共享库的路径,即gcc时查找的路径

2:LD_LIBRARY_PATH环境变量由于程序运行期间查找的路径

二:头文件

vim ~/.bashrc

在末尾添加安装路径(如安装路径为/where/to/instal)

#C
export C_INCLUDE_PATH=XXXX:$C_INCLUDE_PATH

# CPP

export CPLUS_INCLUDE_PATH=XXX:$CPLUS_INCLUDE_PATH

三:库文件

1:vim ~/.bashrc

2:文件尾部添加

export C_INCLUDE_PATH=/snap/mosquitto/704/usr/include:$C_INCLUDE_PATH
export LD_LIBRARY_PATH=snap/mosquitto/704/usr/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=snap/mosquitto/704/usr/lib:$LIBRARY_PATH

3:

source ~/.bashrc

Logo

更多推荐