Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does LD_INCLUDE_PATH actually do anything?

Tags:

c

path

gcc

The GCC manual documents the use of the C_INCLUDE_PATH environment variable to specify additional directories to be searched for include files when preprocessing C programs. However, I've also not infrequently encountered references to a mysterious supposed LD_INCLUDE_PATH environment variable, which is presumed to operate similarly.

I suspect that no such environment variable is actually supported by the GNU toolchain, at least; after all, why would the linker need an include path? My guess is that LD_INCLUDE_PATH is a conflation between C_INCLUDE_PATH and LD_LIBRARY_PATH, but since googling has not provided a definitive answer, I pose the question here so as to help put the matter to rest for anyone searching for information about this in the future. So: is LD_INCLUDE_PATH fictitious, or not?

like image 944
Arto Bendiken Avatar asked Apr 02 '11 13:04

Arto Bendiken


1 Answers

Your suspicion is correct: there's no such thing as LD_INCLUDE_PATH, and I bet you're right, it's an "invention" by confused people. The Google references I found to it were clearly all people surprised that it didn't work, and unclear about what it was supposed to do.

like image 182
Ernest Friedman-Hill Avatar answered Nov 11 '22 06:11

Ernest Friedman-Hill