From ee171b7796c90f339ffc910aa8f998f659745ef9 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Mon, 9 Sep 2013 20:03:18 -0500 Subject: [PATCH] use -fPIC -shared when compiling "libraries" demo This fixes the "libraries" demo's setup.py for building the call_mymath extension. --- Demos/libraries/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Demos/libraries/setup.py b/Demos/libraries/setup.py index b4a3659..557f64f 100644 --- a/Demos/libraries/setup.py +++ b/Demos/libraries/setup.py @@ -8,7 +8,7 @@ from Cython.Distutils import build_ext # For demo purposes, we build our own tiny library. try: print "building libmymath.a" - assert os.system("gcc -c mymath.c -o mymath.o") == 0 + assert os.system("gcc -shared -fPIC -c mymath.c -o mymath.o") == 0 assert os.system("ar rcs libmymath.a mymath.o") == 0 except: if not os.path.exists("libmymath.a"): -- 2.7.4