using library with shared names

I have multiple libraries supplied by different people in which some of the files have shared names. I was just wondering if there is way to use them without changing their names. Can we use the library name also in addition to the header file name to specify the header file to be included.

Eg. My two libraries are “my_lib_one” and “my_lib_two”. They have a comman header file “comm_hdr.h”

include “my_lib_one/comm_hdr.h”

include “my_lib_two/comm_hdr.h”

I was wondering if there is way to use the library in the above manner.

Are the libraries always used together ?

Yes they are. Thanks

sunit: Yes they are. Thanks

Then why have 2 common header files ?

I think the only way is to either give the headers unique names or to specify the full path.

It’s frustrating because typically previously included files are a factor in determining include priority so I’d think you could do something like this:

#include <my_lib_one.h>
#include <comm_hdr.h>
#include <my_lib_two.h>
#include <comm_hdr.h>

But that just results in two inclusions of my_lib_one/comm_hdr.h.

They have a comman header file "comm_hdr.h"

I am not clear whether it is the filename or the contents of the files that are common.

If the libraries are always used together, as confirmed by the OP, then why have 2 separate comm_hdr.h files ?