lang:c:pybind11
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
lang:c:pybind11 [2025/09/05 08:46] – editor | lang:c:pybind11 [2025/09/06 12:45] (現在) – [Windows の場合] editor | ||
---|---|---|---|
行 56: | 行 56: | ||
===== complile ===== | ===== complile ===== | ||
+ | ==== Linux/Mac の場合 ==== | ||
c++ exPybind11.cpp -o examplePybind11.so -std=c++11 -shared -fPIC \ | c++ exPybind11.cpp -o examplePybind11.so -std=c++11 -shared -fPIC \ | ||
-I" | -I" | ||
行 64: | 行 64: | ||
" | " | ||
- | | + | ==== Windows の場合 ==== |
+ | コンパイラや環境に依存すると思われる。\\ | ||
+ | 以下は、" | ||
+ | |||
+ | c++ exPybind11.cpp -o examplePybind11`python-config --extension-suffix` \ | ||
+ | -std=c++11 -shared -fPIC \ | ||
+ | -I" | ||
+ | `python-config --cflags --ldflags` | ||
+ | |||
+ | 上記の -I" | ||
+ | ---- | ||
===== python での使用方法 ===== | ===== python での使用方法 ===== | ||
<file python example.py> | <file python example.py> |
lang/c/pybind11.1757061980.txt.gz · 最終更新: by editor