[Numpy-discussion] Compilation with Visual Studio 2003

David Cournapeau cournape at gmail.com
Sat Nov 10 21:30:59 EST 2007


On Nov 11, 2007 2:33 AM, Matthieu Brucher <matthieu.brucher at gmail.com> wrote:
> Hi,
>
> I want to add some support to ACML, but currently, I can't even compile
> numpy (Visual Studio and g77), the current SVN fails with :
> running build_ext
> No module named msvccompiler in numpy.distutils; trying from distutils
> customize MSVCCompiler
> customize MSVCCompiler using build_ext
> building 'numpy.core.multiarray' extension
> compiling C sources
> D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo
> /Ox
>  /MD /W3 /GX /DNDEBUG -Ibuild\src.win32-2.5\numpy\core\src
> -Inumpy\core\include
> -Ibuild\src.win32-2.5\numpy\core -Inumpy\core\src -Inumpy\core\include
> -ID:\Pyth
> on25\include -ID:\Python25\PC /Tcnumpy\core\src\multiarraymodule.c
> /Fobuild\temp
> .win32-2.5\Release\numpy\core\src\multiarraymodule.obj
> multiarraymodule.c
> d:\Travail\numpy\numpy\core\src\arrayobject.c(662) : warning C4244: '=' :
> conver
> sion de 'npy_longlong' en 'long', perte possible de données
> numpy\core\src\multiarraymodule.c(7592) : error C2065: 'NPY_ALLOW_THREADS' :
> ide
> ntificateur non déclaré
> error: Command "D:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\bin\cl.ex
> e /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Ibuild\src.win32- 2.5\numpy\core\src
> -Inum
> py\core\include -Ibuild\src.win32-2.5\numpy\core -Inumpy\core\src
> -Inumpy\core\i
> nclude -ID:\Python25\include -ID:\Python25\PC
> /Tcnumpy\core\src\multiarraymodule
> .c /Fobuild\temp.win32-2.5\Release\numpy\core\src\multiarraymodule.obj "
> failed w
> ith exit status 2
>
> Is there something I forgot to add in the site.cfg ?
>
No, it looks like NPY_ALLOW_THREADS is not defined: this pre processor
symbol is defined in config.h, which is auto generated by the setup.py
from numpy.core. Can you paste its content (should be somewhere in
your build directory).

David


More information about the NumPy-Discussion mailing list