Skip to content

Build static module with Pybind11 and link against the interpreter #4796

Answered by allsey87
allsey87 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, I overlooked that the module I was trying to build actually contains a mixture of Python code and C++ code. Hence the issue was that I had MODULE (Python code) and _MODULE_pybind11 (C++ code). The code of the C++ module itself defined the name _MODULE_pybind11 and it is used internally by MODULE.

I am still trying to patch everything up and get stuff working, but in summary, it seems that it is pretty straight forward to statically link a Pybind11 library to the Python interpreter.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@allsey87
Comment options

@allsey87
Comment options

Answer selected by allsey87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant