[Numpy-discussion] Compile Numpy in VC++8

Andrew Straw strawman@astraw....
Thu Apr 3 17:46:24 CDT 2008


Matthieu Brucher wrote:
>
>
> 2008/4/3, Chris Barker <Chris.Barker@noaa.gov
> <mailto:Chris.Barker@noaa.gov>>:
>
>     Robert Kern wrote:
>
>     Just since that has been discussed a LOT, for years, I want to be
>     clear:
>
>
>     > Different versions of Microsoft's compiler use different
>     libraries for
>     > the standard C library. Some simple Python extension modules
>     compiled
>     > with a different compiler than the Python interpreter will usually
>     > work.
>
>
>     Do SOME modules USUALLY work just because of what routines in the
>     standard library they happen to call? So it's just a matter of
>     luck that
>     a given module may not trigger a conflict between the two runtime
>     libs?
>
>
> Some parts of the C interface are fixed by the standard. Rely on them
> and you should be OK (safe perhaps for some memory functions, but I
> never saw a problem there). The other parts should never be trusted
> (as the I/O stuff).
> These are the rules I follow.
I have also had success compiling external code that required VS 2008
into a shared library (.dll) and then calling that using ctypes. I'm not
sure if I was just lucky that this worked in my case, or if the windows
linker can deal with the issues resulting from mixing C runtimes when
using .dlls.

-Andrew


More information about the Numpy-discussion mailing list