When attempting to compile an externally provided C++ codebase, I've encountered a confusing problem:
Several of the header files are missing #include <MyLibrary.h>
, where MyLibrary is an obvious dependency that is simply missing, and preventing compilation.
My question is: When compiling C++ code, is there a way to automatically include a dependency header file, without needing to #include it in each of the .h/.cpp files where it is required? In other words, a way to provide the C++ preprocessor a list of header files to automatically include when compiling all of the source code?
I understand that this is probably a very bad idea, but I'm trying to determine if the code I've been provided is simply broken, or if there's some way it could be compiled without manually fixing each file with missing dependencies.