From f7e430292a81bee1cc7e5b7d69b9303c7d184203 Mon Sep 17 00:00:00 2001 From: John Travers Date: Sat, 12 Dec 2015 22:58:23 +0100 Subject: [PATCH] Add ldflags to compile command On my system (Mac OS with custom Python installation) I had to add the ldflags argument to python-config to get things working. --- docs/basics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/basics.rst b/docs/basics.rst index c4db8f753..65109b2b0 100644 --- a/docs/basics.rst +++ b/docs/basics.rst @@ -117,7 +117,7 @@ example can be compiled using the following command .. code-block:: bash - $ c++ -O3 -shared -std=c++11 -I /include `python-config --cflags --libs` example.cpp -o example.so + $ c++ -O3 -shared -std=c++11 -I /include `python-config --cflags --ldflags --libs` example.cpp -o example.so In general, it is advisable to include several additional build parameters that can considerably reduce the size of the created binary. Refer to section