[Python-Dev] How to force export of a particular symbol from python.exe?

Mark Dickinson dickinsm at gmail.com
Sun Dec 14 22:57:41 CET 2008

On Sun, Dec 14, 2008 at 9:06 PM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> That's not the issue. Had pymath.o been linked into python, it's
> symbols would have been exported (is that proper use of English
> tenses?)

Sounds right to me.

> To fix this, I see three solutions
> [...]

Thanks for this;  this gives me a clearer idea of how things might
be solved.

> (python.exe has no business in exporting
> standard math functions, IMO)

It's a little bit messy:  some bits of pymath.c (hypot, and possibly
copysign) are needed in the core, but only on platforms whose
math libraries haven't caught up with C99.  The rest is only
(possibly) needed in the math and cmath modules.  In fact,
on OS X none of pymath.c is needed at all, which results in
lots of "ranlib: file: libpython2.7.a(pymath.o) has no symbols"
in the build output...

I'll try to find a non-hackish solution.


More information about the Python-Dev mailing list