Re: [Numpy-discussion] npymath on Windows

2015-01-02 Thread Carl Kleffner
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

Re: [Numpy-discussion] npymath on Windows

2015-01-01 Thread Sturla Molden
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 libr

Re: [Numpy-discussion] npymath on Windows

2015-01-01 Thread Sturla Molden
On 28/12/14 01:59, Matthew Brett wrote: > As far as I can see, 'acosf' is defined in the msvc runtime library. > I guess that '_acosf' is defined in some mingw runtime library? AFAIK it is a GCC built-in function. When the GCC compiler or linker sees it the binary code will be inlined. https://

Re: [Numpy-discussion] npymath on Windows

2014-12-29 Thread Matthew Brett
Hi, On Sun, Dec 28, 2014 at 4:17 PM, David Cournapeau wrote: > > > On Sun, Dec 28, 2014 at 1:59 AM, Matthew Brett > wrote: >> >> Hi, >> >> Sorry for this ignorant email, but we got confused trying to use >> 'libnpymath.a' from the mingw builds of numpy: >> >> We were trying to link against the m

Re: [Numpy-discussion] npymath on Windows

2014-12-28 Thread Carl Kleffner
Hi, 2014-12-28 17:17 GMT+01:00 David Cournapeau : > > > On Sun, Dec 28, 2014 at 1:59 AM, Matthew Brett > wrote: > >> Hi, >> >> Sorry for this ignorant email, but we got confused trying to use >> 'libnpymath.a' from the mingw builds of numpy: >> >> We were trying to link against the mingw numpy '

Re: [Numpy-discussion] npymath on Windows

2014-12-28 Thread David Cournapeau
On Sun, Dec 28, 2014 at 1:59 AM, Matthew Brett wrote: > Hi, > > Sorry for this ignorant email, but we got confused trying to use > 'libnpymath.a' from the mingw builds of numpy: > > We were trying to link against the mingw numpy 'libnpymath.a' using > Visual Studio C, but this give undefined symb

Re: [Numpy-discussion] npymath on Windows

2014-12-28 Thread Carl Kleffner
Hi, according to http://sourceforge.net/p/mingw-w64/discussion/723798/thread/7da101da : *"Sorry, sharing static libraries with MSVC is not supported right now, the contributor who was supposed to work on this went MIA.The only sane way to do it right now is to use a DLL."* this problem seems to

[Numpy-discussion] npymath on Windows

2014-12-27 Thread Matthew Brett
Hi, Sorry for this ignorant email, but we got confused trying to use 'libnpymath.a' from the mingw builds of numpy: We were trying to link against the mingw numpy 'libnpymath.a' using Visual Studio C, but this give undefined symbols from 'libnpymath.a' like this: npymath.lib(npy_math.o) : error