[Numpy-discussion] distutils & C++ & Fortran

Robert Kern robert.kern at gmail.com
Tue Oct 16 17:45:12 EDT 2012

On Tue, Oct 16, 2012 at 9:56 PM, Pauli Virtanen <pav at iki.fi> wrote:
> Charles R Harris <charlesr.harris <at> gmail.com> writes:
>> On Sun, Oct 14, 2012 at 11:53 AM, Pauli Virtanen <pav <at> iki.fi> wrote:
>> Hi,
>> I'd like to link both C++ and Fortran code into a single
>> Python extension, using  numpy.distutils (for scipy.special).
>> But it seems the distutils-based tools actually cannot do this?
>> Does someone know if there's a way to work around this?
>> Looks like the answer is "no" ;) Is this a linking problem?
> Pretty much. Knowing the Fortran or C++ runtime names / link flags
> on different compilers would be enough, but apparently this
> information is not written down anywhere in the build system.

With some platforms/compilers, we use the compiler itself as the
linker, because it knows the right runtime library and link flags for
the language, often because they are more variable with respect to
specific compiler versions.

Robert Kern

More information about the NumPy-Discussion mailing list