- visual studio cpp cmake 开发环境
略 - windos 下python3安装,以及pybind11库安装
略
说明:1. 对于linux货mac 环境需要安装python-dev版本,如python3.9-dev,但在windows环境无 dev版本,直接使用 非dev的常规版本即可,windows常规版本即带有 Python.h 等各种头文件,可以支持python 扩展模块开发 - 源码
#include <iostream>
#include <Python.h>
#include <pybind11/pybind11.h>
namespace py = pybind11;
int add(int a, int b) {
return a + b;
}
std::string hello(std::string someone) {
std::cout << "hello " << someone << std::endl;
return