According to g++ -print-search-dirs
my C++ compiler is searching for libraries in many directories, including ...
- /lib/../lib/:
- /usr/lib/../lib/:
- /lib/:
- /usr/lib/
Naively, /lib/../lib/
would appear to be the same directory as /lib/
— lib's parent will have a child named lib, "that man's father's son is my father's son's son" and all that. The same holds for /usr/lib/../lib/
and /usr/lib/
Is there some reason, perhaps having to do with symbolic links, that g++ ought to be configured to search both /lib/../lib/
and /lib/
?
If this is unnecessary redundancy, how would one go about fixing it?
If it matters, this was observed on an unmodified install of Ubuntu 9.04.
Edit: More information.
The results are from executing g++ -print-search-dirs
with no other switches, from a bash shell.
Neither LIBRARY_PATH nor LPATH are output from printenv
, and both echo $LPATH
and echo LIBRARY_PATH
return blank lines.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…