Код: Выделить всё
#include
int add(int i, int j) {
return i + j;
}
PYBIND11_MODULE(example, m) {
m.doc() = "pybind11 example plugin"; // optional module docstring
m.def("add", &add, "A function that adds two numbers");
}
Код: Выделить всё
example.dll
example.exp
example.lib
example.pdb
Код: Выделить всё
>>> import example
Код: Выделить всё
>>> import example
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'example'
Подробнее здесь: https://stackoverflow.com/questions/786 ... est-module
Мобильная версия