jayyoung0802 / PyCppBridge

Examples demonstrating bidirectional interaction between Python and C++ code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyCppBridge

Examples show bidirectional interaction between Python and C++.

cython

cd cython/
bash compile.sh
python demo.py

pybind

cd pybind/
git clone https://github.com/pybind/pybind11.git
bash compile.sh
python main.py

Another Compile Method: (Reference: https://www.jianshu.com/p/0b4b49dd706a)

cd pybind/
git clone https://github.com/pybind/pybind11.git
cd another_compile/
c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) example.cpp -o example$(python3-config --extension-suffix)
python run_example.py

About

Examples demonstrating bidirectional interaction between Python and C++ code.


Languages

Language:Python 44.5%Language:C++ 32.1%Language:Cython 15.8%Language:CMake 5.8%Language:Shell 1.8%