Include header file specificity

How can I make the inclusion of external library header files (package registry / git repo) more specific to avoid confusion. For example, I have a header file named common_types.h from LibraryA and the same header file name in LibraryB - how can I specify LibraryA/common_types.h in my project source files for clarity so that it’s immediately obvious that it’s not LibraryB/common_types.h?

In addition to the above where the library files are copied into the .pio directory, how do I do this for libraries that have been included via a symlink with an alias. I’ve used this this method for live modification of the library during testing.
E.g. platformio.ini:

[common]
lib_dep_external =
  LibraryA=symlink://C:/platform_io_projects/Library_A
  LibraryB=symlink://C:/platform_io_projects/Library_B
  1. Rename the common_types.h to be unique and library specific, such as lib_a_common_types.h, lib_b_common_types.h, or
  2. Add build_flags = -IC:/platform_io_projects/ so that you can do #include <Library_A/common_types.h>.
1 Like