When including header files, is the path case sensitive?

前端 未结 4 1370
无人及你
无人及你 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条回答
  •  我在风中等你
    2020-11-28 15:37

    Its not C++ standard, its the Linux way, where all path names are case sensitive. The best practice is too chose whatever file name you want ( mostly lowercase) and use the same case in the include directive. Also always use relative file paths.

提交回复
热议问题