Search code examples
c++visual-studioincludec-preprocessor

How to force Visual Studio preprocessor case sensitivity with #includes?


If you have a header file named ThisIsAHeaderFile.h, the following will still locate the file in Visual Studio:

#include <ThisIsAheaderFile.h>

Is there a way to enforce case sensitivity so that the #include will result in an error?


Solution

  • You can't, because the Windows file system is itself case-insensitive.

    If you could get into a situation where you had both RICHIE.h and richie.h, it might make sense to control case sensitivity, but you can't.