从命令行运行时(win7 cmd)gcc -print-search-dirs生成:
install: C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/
programs: =C:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.0/;C:/mingw64/bin/../libexec/gcc/;C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/x86_64-w64-mingw32/5.1.0/;C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/
libraries: =C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/;C:/mingw64/bin/../lib/gcc/;C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/5.1.0/;C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../x86_64-w64-mingw32/5.1.0/;C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../lib/;C:/mingw510/x86_64-510-posix-seh-rt_v4-rev0/mingw64/mingw/lib/x86_64-w64-mingw32/5.1.0/;C:/mingw510/x86_64-510-posix-seh-rt_v4-rev0/mingw64/mingw/lib/../lib/;C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/lib/;C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../;C:/mingw510/x86_64-510-posix-seh-rt_v4-rev0/mingw64/mingw/lib/`
我理解分号(如PATH)但我在/../
上并不清楚如图所示。有人可以解释一下吗?
答案 0 :(得分:2)
它与任何路径规范中的..
具有相同的含义,即父目录。
例如,C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/
对应C:/mingw64/lib/gcc/x86_64-w64-mingw32/5.1.0/
。