简介
https://pybind11.readthedocs.io/en/stable/index.html
Seamless operability between C++11 and Python; 实现C++11和Python的无缝互操作。很厉害。
版本兼容问题的引用错误
https://mzhan017.blog.csdn.net/article/details/128826022
Python: ImportError: dynamic module does not define module export function (PyInit_name;需要下载新版本pybind11进行项目的编译。
自身编译错误
/home/mzhan017/aviso-fes-main/third_party/pybind11/include/pybind11/detail/common.h:112:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
这个错误的解决方法之一:
dnf install python3-devel;
这个依赖:platform-python-devel,这个包里包含有Python.h文件
https://centos.pkgs.org/8-stream/centos-appstream-aarch64/platform-python-devel-3.6.8-51.el8.aarch64.rpm.html
这里要说明一下,centos7和centos8,这个文件所在的rpm包不同。
https://centos.pkgs.org/7/centos-aarch64/python3-devel-3.6.8-17.el7.aarch64.rpm.html
所以,pybind11的编译需要platform-python-devel做支持。还是要安装python3-devel。
python3-devel-3.7.4-8.se.01.ky10.aarch64.rpm
应用举例
https://lief-project.github.io/doc/latest/compilation.html