PY_LONG_LONG problem

From: Alex Hunsley (lard_at_tardis.ed.ac.molar.uk)
Date: 06/30/04


Date: Wed, 30 Jun 2004 13:34:49 +0100

I've compiling boodler (http://www.eblong.com/zarf/boodler/), which is written
(mostly) in python, for windows, using Python 2.3.

When at the stage of compiling some C code, I'm running into problems:

$ make
make[1]: Entering directory `/cygdrive/c/tools/boodler/cboodle'
gcc -O2 -I/usr/include/python2.3 -Wall -Wmissing-prototypes -Wstrict-prototype
s -Wno-unused -c -o cboodle.o cboodle.c
In file included from C:/Python23/include/Python.h:75,
                  from cboodle.c:15:
C:/Python23/include/intobject.h:41: error: syntax error before "PyInt_AsUnsigned
LongLongMask"
[snip a few more errors]

The problem is that the compiler is falling over whenever PY_LONG_LONG is
mentioned. The first example, from intobject.h as reported above, is this:

#ifdef HAVE_LONG_LONG
PyAPI_FUNC(unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *);
                     ^^^^^^^^^^^^

then, following things along, I see that in pyport.h we have:

#ifndef PY_LONG_LONG
#define PY_LONG_LONG long long

so, is it "long long" that is actually causing the problems here?

I've never compiled C that uses python includes before, so I'm a bit stumped.

thanks
alex



Relevant Pages

  • Re: matplotlib installation
    ... Any suggestions on installing matplotlib for Python 2.6.2 on a Windows ... Maintainers for some packages have run into a wall ... found compiling for 2.6 to be impossible. ...
    (comp.lang.python)
  • Re: about presicion
    ... _Any_ binary extension Python module compiled for Python 2.3 cannot even ... Windows between any two releases of Python and will presumably continue ... be the case for any other binary extension module whatsoever. ... software and is interested in compiling gmpy for Windows under Python ...
    (comp.lang.python)
  • Re: - E02 - Support for MinGW Open Source Compiler
    ... > Python product that requires compiling, ... If an extension for python is written in C, ... an extension needs testing on windows anyway. ...
    (comp.lang.python)
  • Re: Speed advantage of language written in itself?
    ... You can extend it right there on the fly. ... infrastructure that doesn't come with the language. ... It's the compiling algorithm that matters. ... Python can be said to be exactly as fast as its best ...
    (comp.lang.lisp)
  • Python 2.4.2 gcc 3.4.4 Solaris 8 build issues
    ... I encountered some build issues when compiling Python 2.4.4 on a Solaris 8 ... Is this a known problem on Solaris? ... Falls Sie nicht der angegebene ...
    (comp.lang.python)