Hi,

without further testing; this approach may help:

(1) create a shared library with all symbols from libnpymath.a:
$ gcc -shared -o libnpymath.dll -Wl,--whole-archive libnpymath.a
-Wl,--no-whole-archive  -lm

(2) create a def file:
gendef libnpymath.dll

There are now two files created by mings-w64 tools: libnpymath.dll,
libnpymath.def

(3) create import libs for MSVC: first open a new command Window with the
VC command prompt:
> lib /machine:i386 /def:libnpymath.def      (for 64bit use: /machine:X64)
Microsoft (R) Library Manager Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library libnpymath.lib and object libnpymath.exp

libnpymath.dll, libnpymath.lib and libnpymath.exp should be sufficient for
MSVC. libnpymath.dll has to be deployed.

-- carlkl


2015-01-01 21:34 GMT+01:00 Sturla Molden <[email protected]>:

> On 28/12/14 17:17, David Cournapeau wrote:
>
> > This is not really supported. You should avoid mixing compilers when
> > building C extensions using numpy C API. Either all mingw, or all MSVC.
>
> That is not really good enough. Even if we build binary wheels with
> MinGW (see link) the binary npymath library should be useable from MSVC.
>
> https://github.com/numpy/numpy/pull/5328
>
>
> Sturla
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> [email protected]
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to