Pass function from python to C++ and then execute using that function defintion #4634
Unanswered
behzadtabari
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem description
Since I want the objective function user-defined I need to pass a function declaration and definition from Python to C++ and then I need to use that function in another object member function which takes in the function argument, when I try to implement it as below I get the following error, I am completely stuck and I do not even know where to look for it to understand if it is feasible to use this feature in Pybind11
Reproducible example code
c++ wrapping and definitions
Beta Was this translation helpful? Give feedback.
All reactions