-I option set header file searching path for gcc/g++, and CPLUS_INCLUDE_PATH/CPATH append the searching path list.Then what about libs? It seems that LD_LIBRARY_PATH is just a path list for  run-time library searching. -L option is necessary to specify any lib path other than /usr/lib and /usr/local/lib.Is there an environment variable similar to CPATH/CPLUS_INCLUDE_PATH, to do the compile-time job?
How to set library searching path using environment variable in compile-time
compiling;gcc