Pybind11 breaks Panda3d. Please, help

Hello. I am trying to embed some Python code in C++ Panda engine. I am using pybind11.
There’s a name conflict:

get_type_handle confilcts with pybind’s funciton with the same name:

So, if pybind’s header gets included after the register_type.h (and it’s eventually does, e.g. in “config_MODULE_NAME.cxx” files), everything breaks.

I am not a C++ expert, so I don’t know solutions other than using a different design and avoiding including these two headers in one file. Maybe there’s an obvious solution that I am missing?

OK, since it’s my own fork of Panda3d, I’ve just replaced the macro in the source code.

Another strange thing is that panda.core fails to build if I include pybind, it results in error:

"pybind11 requires MSVC 2015 update 3 or newer"

and it fails the following check:

#  if _MSC_FULL_VER < 190024210
#    error pybind11 requires MSVC 2015 update 3 or newer
#  endif

Though I am using MSVC 2019. It seems that the build system replaces the _MSC_FULL_VER somewhere during this step?