1. Home
  2. Browse
  3. pybind11

pybind11

v3.0.0#1Go to latest

pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code

Install

Run the following Vcpkg command to install the port.

vcpkg install pybind11

Usage

pybind11 provides CMake integration:

# Easy

set(PYBIND11_FINDPYTHON ON)

find_package(pybind11 CONFIG REQUIRED)

pybind11_add_module(MyModule1 src1.cpp)

# Advanced

find_package(Python COMPONENTS Interpreter Development)

find_package(pybind11 CONFIG REQUIRED)

Python_add_library(MyModule2 src2.cpp)

target_link_libraries(MyModule2 PRIVATE pybind11::headers)

Dependencies

See source

Version

v3.0.0#1

Publication

Supports

All

GitHub

pybind/pybind11

Homepage

github.com/pybind/pybind11

Documentation

pybind11.readthedocs.io

Subtree

15d59ec83c

License

BSD-3-Clause

Definition

Manifest