[Distutils] static linking in distutils/setuptools?
trentm at ActiveState.com
Fri Jan 27 09:33:51 CET 2006
[Bob Ippolito wrote]
> On Jan 26, 2006, at 3:29 PM, Robert Kern wrote:
> > Stefan Seefeld wrote:
> >> Robert Kern wrote:
> >>> Not really, no. In many cases (e.g., GNU ld), there's simply no
> >>> way to tell the
> >>> linker that you prefer static libraries to shared libraries when
> >>> you are
> >>> building a shared library like a Python extension. You simply
> >>> have to make sure
> >>> that the static libraries are found first.
> >> I believe this is wrong. The (GNU ld) man pages mention '-
> >> Bdynamic' and '-Bstatic'
> >> as a means to instruct the linker to link to a particular library
> >> dynamically or
> >> statically. (To only link statically to libbar.a you could write e.g.
> >> ... -lfoo -Bstatic -lbar -Bdynamic -lbaz
> >> etc.)
> > Ah, yes, you are correct. Unfortunately, OS X's ld does not have
> > these options
> > (and is not GNU; I am an idiot).
> What I normally do is specify the full path to the library in
> extra_link_args, and remove it from the libraries list.
TrentM at ActiveState.com
More information about the Distutils-SIG