[MATRIX-SIG] Compiling NumPy on Windows

Paul F. Dubois Paul F. Dubois" <dubois1@llnl.gov
Thu, 15 Jan 1998 09:26:17 -0800

I'm trying to package up Konrad's version of NumPy so that it produces
dynamically-loadable DLL's under MSVC 5.0. I have no problem compiling
Python 1.5, and no problem making my own extensions that do not use NumPy.
When I try to compile NumPy's array object, either as a C or C++ file, I get
an error in arraytypes.c at this line:

PyArrayDescr *PyArrayDescrFromType(int type) {

The complaint it makes makes it clear that it thinks the second instance of
the pattern PyArrayDescr is meant to refer to the type PyArrayDescr, when in
fact it is part of a name. Indeed, if you change the name of the function
being defined to something else, it compiles this line without problems.

PyArrayDescr has exactly 14 characters in it, and I've heard of compilers
that only used 14 significant characters in an external name, although I
wouldn't expect C++ to work very well with such a limit.  But I also haven't
heard anybody else say they had this problem.

Does anyone know anything about this?

MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org