Problem59 GCC密切相关的一些环境变量?
Ans:
环境变量 | 描述 |
TMPDIR | Thisvariable shows location of temporary file location. GCC uses thislocation to store temporary files during the compilingand linking processes. |
GCC_EXEC_PREFIX | If thisvariable is set, GCC will look into the directory to findsub programs. |
COMPILER_PATH | Thisis a colon-separated list of directories that GCC uses to find out subprograms if search fails using GCC_EXEC_PREFIX variable. |
LIBRARY_PATH | Thisis a colon-separated list of directories that is used to find out librariesfor linking process. |
C_INCLUDE_PATH | Colonseparated list of directories to find out header files forC programs. |
CPLUS_INCLUDE_PATH | Colonseparated list of directories to find out header files forC++ programs. |
LD_LIBRARY_PATH | Path forshared libraries. |
下面的命令用于查看gcc查找头文件的默认路径:
gcc-v -E -
要设置其他的路径,用如下命令:
exportC_INCLUDE_PATH=/opt