Centos

定義包含目錄路徑(對於 *.h) CentOS

  • November 22, 2020

我正在閱讀這些問題https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux

https://unix.stackexchange.com/a/45106/235247

我正在編譯gmp

./configure --prefix=/usr/local/Custom/gmp

並安裝產生三個文件夾。

include,libshare

在這種情況下,斌

export PATH=$PATH:/usr/local/Custom/SOMEPROGRAM/bin

lib可以使用添加文件夾

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Custom/gmp/lib

我的問題,是否有一些不同*PATH_VARIABLE*的include文件夾(帶有*.h文件)?

export PATH_VARIABLE=$PATH_VARIABLE:/usr/local/Custom/gmp/include

C_INCLUDE_PATH為 C 標頭檔或CPLUS_INCLUDE_PATHC++ 標頭檔或CPATH兩者設置

這裡有更多資訊,或者閱讀man gcc

引用自:https://unix.stackexchange.com/questions/409061