
3 changed files with 31 additions and 1 deletions
@ -0,0 +1,14 @@ |
|||
#include <string> |
|||
#include <pybind11/pybind11.h> |
|||
|
|||
using namespace std; |
|||
|
|||
string testfunc() { |
|||
return "fsdfg"; |
|||
} |
|||
|
|||
PYBIND11_MODULE(_pybind, m) { |
|||
m.doc() = "pybind11 example plugin"; // optional module docstring
|
|||
m.def("add", &testfunc, "A function which adds two numbers"); |
|||
} |
|||
|
Loading…
Reference in new issue