lang:c:pybind11
差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
lang:c:pybind11 [2025/08/11 10:43] – 作成 editor | lang:c:pybind11 [2025/08/17 09:35] (現在) – editor | ||
---|---|---|---|
行 1: | 行 1: | ||
====== pybind11 ====== | ====== pybind11 ====== | ||
+ | ===== インストール ===== | ||
+ | ---- | ||
===== コンパイル/ | ===== コンパイル/ | ||
+ | リンク時に以下を追加する | ||
+ | `python3-config --cflags --ldflags` -fPIC -shared | ||
+ | ---- | ||
===== 実装 ===== | ===== 実装 ===== | ||
==== 関数 ==== | ==== 関数 ==== | ||
行 8: | 行 13: | ||
==== template ==== | ==== template ==== | ||
+ | |||
+ | ---- | ||
+ | ==== multithread ==== | ||
+ | thread で pybind11 の module を実行しても、multithread にならない。 | ||
+ | source に以下を記述する。 | ||
+ | |||
+ | ---- | ||
+ | ===== Mac ===== | ||
+ | OS でデフォルトの python では、リンク時にエラーになる場合がある。 | ||
+ | デフォルトでは、python3-config がないので、 | ||
+ | Homebrew で python をインストールして、そちらを使う。 | ||
lang/c/pybind11.1754908987.txt.gz · 最終更新: by editor