0

So I understand, when writing the following statement #include <stdio.h> the compiler searches for this header file in select search paths outlined in Visual Studio project properties. But what I don't understand is how this works for a header (*.h) files that are not installed by Visual Studios such as in the following include statement:

#include <Zydis/Defines.h>

I've tried Googling this question but was not able to find something that answered my question.Just to be clear where does the compiler look when encountering the above #include statement ?

Jkf1298
  • 31
  • 2
  • If there exists a directory and file `Zydis/Defines.h` in one of the standard locations where the compiler is looking for headers, then it will "just work". If it's not in a standard location, then compilers have a setting of option to *add* a path to the standard list the compiler is using. – Some programmer dude Mar 02 '23 at 15:38
  • @Someprogrammerdude thank you. Can you describe where are these "standard" locations where the compiler looks ? Are you referring to the path(s) that are stored in the project properties Configuration Properties->VC++ Directories->Include Directories? – Jkf1298 Mar 02 '23 at 15:50
  • No I can't, because it depends on the compiler, the host system and the target system. Possibly it might also be possible to update the base configuration to add more directories. – Some programmer dude Mar 02 '23 at 17:32
  • Hi, i'm not 100% sure about mvsc, but with GCC you can supply the compiler program with an -I argument that specifies where more headers can be found (https://www.rapidtables.com/code/linux/gcc/gcc-i.html). I'm assuming that msvc will have a similar argument supplied behind the scenes by vs. – Richard Bamford Mar 02 '23 at 17:33

0 Answers0