-
Notifications
You must be signed in to change notification settings - Fork 0
Common Environment Variables
鄭余玄 edited this page Jan 20, 2019
·
3 revisions
-
PATH: A list of directories in which to search for executables. -
LD_LIBRARY_PATH: A list of directories in which to search for ELF libraries at execution-time.
Linking using GCC uses these directories when searching for ordinary libraries for the -l option (but directories specified with -L come first).
CPATH specifies a list of directories to be searched as if specified with -I, but after any paths given with -I options on the command line. This environment variable is used regardless of which language is being preprocessed.
The remaining environment variables apply only when preprocessing the particular language indicated. Each specifies a list of directories to be searched as if specified with -isystem, but after any paths given with -isystem options on the command line.
-
CC: Program for compiling C programs; defaultcc. -
CXX: Program for compiling C++ programs; defaultg++. -
CPP: Program for running the C preprocessor, with results to standard output; default$(CC) -E. -
FC: Program for compiling or preprocessing Fortran programs; defaultf77. -
CFLAGS: Extra flags to give to the C compiler. -
CXXFLAGS: Extra flags to give to the C++ compiler. -
CPPFLAGS: Extra flags to give to the C preprocessor and programs that use it (the C and Fortran compilers). -
FFLAGS: Extra flags to give to the Fortran compiler. -
LDFLAGS: Extra flags to give to compilers when they are supposed to invoke the linker,ld, such as-L. Libraries (-lfoo) should be added to theLDLIBSvariable instead.