diff options
author | Erlend E. Aasland <erlend.aasland@protonmail.com> | 2022-10-29 18:46:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-29 18:46:34 (GMT) |
commit | e063c23c65143a3afae3e201459dc0d52cb6fc96 (patch) | |
tree | a5c96ecdd9f990d9e2c2c7a6fe5d2e16023bac66 /Doc/extending | |
parent | 1561e708c70c9fe6fdbaf8885a3ee4007715427e (diff) | |
download | cpython-e063c23c65143a3afae3e201459dc0d52cb6fc96.zip cpython-e063c23c65143a3afae3e201459dc0d52cb6fc96.tar.gz cpython-e063c23c65143a3afae3e201459dc0d52cb6fc96.tar.bz2 |
gh-93358: Fix python-config docs for how to embed Python (#98649)
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/embedding.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/extending/embedding.rst b/Doc/extending/embedding.rst index 5f5abdf..e64db37 100644 --- a/Doc/extending/embedding.rst +++ b/Doc/extending/embedding.rst @@ -298,16 +298,16 @@ be directly useful to you: .. code-block:: shell-session - $ /opt/bin/python3.4-config --cflags - -I/opt/include/python3.4m -I/opt/include/python3.4m -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes + $ /opt/bin/python3.11-config --cflags + -I/opt/include/python3.11 -I/opt/include/python3.11 -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -* ``pythonX.Y-config --ldflags`` will give you the recommended flags when - linking: +* ``pythonX.Y-config --ldflags --embed`` will give you the recommended flags + when linking: .. code-block:: shell-session - $ /opt/bin/python3.4-config --ldflags - -L/opt/lib/python3.4/config-3.4m -lpthread -ldl -lutil -lm -lpython3.4m -Xlinker -export-dynamic + $ /opt/bin/python3.11-config --ldflags --embed + -L/opt/lib/python3.11/config-3.11-x86_64-linux-gnu -L/opt/lib -lpython3.11 -lpthread -ldl -lutil -lm .. note:: To avoid confusion between several Python installations (and especially |