windows 10 上使用pybind11进行C 和Python代码相互调用 | Interfacing C and Python

本文首发于个人博客https://kezunlin.me/post/8b9c051d/,欢迎阅读!Interfacing C and Python with pybind11 on windows 10SeriesPart 1: Interfacing C and Python with pybind11 on windows 10Part 2: Interfacing C ...
摘要由CSDN通过智能技术生成

本文首发于个人博客https://kezunlin.me/post/8b9c051d/,欢迎阅读!

Interfacing C and Python with pybind11 on windows 10

Series

Guide

requirements:

  • pybind11 v2.3.dev0
  • python 2.7

install pytest

    pip install pytest 

compile


    git clone https://github.com/pybind/pybind11.git
    cd pybind11
    mkdir build
    cd build
    cmake-gui ..

with options

    PYBIND11_CPP_STANDARD /std:c  11 # default c  14
    PYTHON_EXECUTABLE C:/Python27/python.exe
    CMAKE_INSTALL_PREFIX C:/Program Files/pybind11

compile with VS 2015 with x64 Release

install to C:Program Filespybind11 with only include and share

    $ tree .
    .
    ├── include
    │   └── pybind11
    │       ├── attr.h
    │       ├── buffer_info.h
    │       ├── cast.h
    │       ├── chrono.h
    │       ├── common.h
    │       ├── complex.h
    │       ├── detail
    │       │   ├── class.h
    │       │   ├── common.h
    │       │   ├── descr.h
    │       │   ├── init.h
    │       │   ├── internals.h
    │       │   └── typeid.h
    │       ├── eigen.h
    │       ├── embed.h
    │       ├── eval.h
    │       ├── functional.h
    │       ├── iostream.h
    │       ├── numpy.h
    │       ├── operators.h
    │       ├── options.h
    │       ├── pybind11.h
    │       ├── pytypes.h
    │       ├── stl.h
    │       └── stl_bind.h
    └── share
        └── cmake
            └── 
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值