Replies: 1 comment 1 reply
-
I might have a (work in progress) solution to this. See #4796. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
pybind registers module init functions in constructor of a global object (detail::embedded_module pybind11_module_), defined with PYBIND11_EMBEDDED_MODULE.
Unfortunately, if the embedded module is defined in a static library that is linked to the main executable, the global object gets dropped by the linker (as it is not referenced elsewhere), so no initialization is performed and PyImport_AppendInittab is not called.
I must not be the first one to hit this (however, did not find smth similar in github issues), any advice would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions