C and C++ compiler include order and relative paths
I did a test with the following folder structure: MainFolder main.cpp LibraryFile.h Files LibraryFile.h Library1Name MainHeader.h LibraryFile.h Files LibraryFile.h Library2Name MainHeader.h LibraryFile.h Files LibraryFile.h Let’s assume the MainFolder (root) folder is in the include paths and nothing else. Now in main.cpp I do: #include "Library1Name/MainHeader.h" Both MainHeader.h from Library1 and Library2 include: #include "LibraryFile.h" #include