If the KIM-API library is compiled with Compiler A and in the process of building a kimpy, we use a Compiler B, it will end with an error. The issue is that C++ generally breaks binary compatibility across different compilers, usually due to name mangling, object layout, exception support.
A way to get around this is to update the kimpy interface to use the KIM-API C-style interface, similar to the KIM-API integration in the LAMMPS implementation.