In some cases, even basic header files can’t be included from cpp files. For example, attempting to include “model_metadata.h” will result in linker errors for multiple definitions. Trying to extern “C” will result in “Template with c linkage” errors as these header files seem to attempt to deal with C++, and in doing so pull in C++ constructs.
EDIT: also model_metadata doesn’t include stdbool.h so you can’t simply include it without first including stdbool.h.
EDIT2: the difficulty is in part because there are definitions and not just declarations in the SDK header files, making it impossible to include them from more than one compilation unit. I suspect this is why the ei_microphone is required to perform mallocs during init. Whomever wrote this probably ran into the same thing and wasn’t able to directly reference the slice lengths from the metadata.