Re: [Distutils] how to build a python extension with a shared object in osx10.11

2017-07-27 Thread Nathaniel Smith
Try libraries=["foo"] – this should cause it to pass "-lfoo" to the linker, and then the linker will convert that into "libfoo.dylib". On Jul 27, 2017 11:11 AM, "bin" wrote: > I have installed libfoo.dylib into /usr/local/lib > > And my python extension's setup.py: > >

[Distutils] how to build a python extension with a shared object in osx10.11

2017-07-27 Thread bin
I have installed libfoo.dylib into /usr/local/lib And my python extension's setup.py: from distutils.core import setup, Extension module1 = Extension('bar', libraries=['libfoo2.dylib', ], language="c++", extra_compile_args=['-v', ],