When including header files, is the path case sensitive?

前端 未结 4 1362
无人及你
无人及你 2020-11-28 14:59

Given this directory tree:

src/MyLibrary/MyHeader.h
src/file.cpp

file.cpp:

#include \"mylibrary/myheader.h\"
...

Compiling file.cpp works

4条回答
  •  Happy的楠姐
    2020-11-28 15:52

    The case sensitivity depends on the Operating System. Windows is not case sensitive. Linux is.

    EDIT:

    Actually, as observed by Martin York's comment, the case sensitivity depends on the file system. By default Windows uses a case insensitive file system, while Linux uses a case sensitive one. For whoever is interested to know which file systems are case sensitive and which aren't, there is a comprehensive list on Wikipedia: Comparison of file name limitations.

提交回复
热议问题