Is it possible to hide an
#include <header.h> //from library B
from projects using the library A?
I need to keep the include there because otherwise my library A won’t compile, but as that header is from other library B that shouldn’t be visible for the main project, the main program tries to find that header.h and compilation fails.
You could put it inside an
#ifdefand define the symbol only when compiling library A:Update: but probably the best option is @Robinson’s suggestion above: don’t include it in any header file, only in .cpp files when needed.