开发者

Does LD_INCLUDE_PATH actually do anything?

开发者 https://www.devze.com 2023-02-21 20:03 出处:网络
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 in

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 t开发者_如何学运维he 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消