[Pythonmac-SIG] Building Python extensions in C++ with autoconf

Nicholas Riley njriley at uiuc.edu
Thu Mar 11 17:28:50 EST 2004


On Thu, Mar 11, 2004 at 01:00:07PM -0800, Theodore D. Sternberg wrote:
> > You need to use the -module flag to libtool.  Distutils as of Python
> > 2.3 does a fine job of creating Python extensions with C++, and is a
> > lot easier to use IMO.
> 
> Do you mean put something like this in Makefile.am:
> 
> libtest_la_LDFLAGS = -module  ?
> 
> That doesn't do it for me; it suppresses the building of .dylib's all 
> right, but it doesn't then go on to build .so's; it just builds static 
> libraries (.a's).

I don't use Automake, but you need to pass -module to (g)libtool, not
to the linker.  It worked for me in the past to build a .so.  It looks
like you can remove the versioning stuff with -avoid-version.

-- 
=Nicholas Riley <njriley at uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>



More information about the Pythonmac-SIG mailing list