What is the best method to include a file that has same name in another folder from additional include directories?
Example:
lib1/include/foo.h
lib2/
You can just do this:
#include "lib1/include/foo.h"
#include "lib2/include/foo.h"
and make sure that the parent directories of both lib1 and lib2 are in your search path for includes (but not the actual include subdirectories themselves).
Note that if both headers use the same symbol as an include guard then this method will not work - you would need to undefine the conflicting symbol between the two includes:
#include "lib1/include/foo.h"
#undef FOO_H
#include "lib2/include/foo.h"