Compile PyBind11 on Windows
Requirements
- cmake (tested with v3.26.1)
- gcc (tested with v10.3)
- python (tested with v3.10.5)(todo)
- boost (tested with v1.83.0)
Get PyBind11 source
You can find the source of PyBind11 from GitHub
compile
bash
cmake -S . -B ./build \
-DPYTHON_EXECUTABLE=<YOUR_PYTHON_EXECUTABLE_DIR>\python.exe \
-DBoost_INCLUDE_DIR=<BOOST_SOURCE_DIR>/install_prefix2/include \
-DCMAKE_BUILD_TYPE=Release
cmake --build ./build --config Release --target check
You can find the compiled files in ./mock_install