pybind11 与 C++ 交互 绑定类 与 回调函数
代码结构
----3rdparty
------pybind11 # 存放 pybind11编译好后的文件夹
—build
------test.py # 测试文件
—include
------calculator.h # 计算器类
—src
------calculator.cpp
-------example.cpp # 绑定计算器类的例子
—CMakeLists.txt
pybind11 怎么安装可以另行搜索,或者留言,根据实际情况我会再写教程。
编译环境
原创
2021-09-24 16:35:53 ·
1944 阅读 ·
0 评论