include filepaths

I'm looking at the way a program is including other .cpp and .h files and wonder why they are able to do the following:

On the file with path: /program/src/files/testfile.cpp
they have: #include"boost/arrays.hpp"
however, the "boost/arrays.h" file is located in
/program/depends/include/boost/arrays.hpp

When I try to do #include, it would give me a compilation error unless the file was located in /program/src/files/boost/arrays.hpp.

It looks very messy to write full filepaths in my includes and was wondering how one could achieve to include files this way.
You can tell the preprocessor to search for include files in a particular directory. For tools with a GCC-compatible front-end, that option is -I (the capital letter 'i').
https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Directory-Options.html
Nice, Thanks a lot!
Topic archived. No new replies allowed.