PY_LONG_LONG problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex Hunsley

    PY_LONG_LONG problem

    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_AsUnsign ed
    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(unsi gned PY_LONG_LONG) PyInt_AsUnsigne dLongLongMask(P yObject *);
    ^^^^^^^^^^^^



    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

  • Alex Hunsley

    #2
    Re: PY_LONG_LONG problem

    Alex Hunsley wrote:
    [color=blue]
    > 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:[/color]

    [snip]
    [color=blue]
    > 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.[/color]

    Btw, this is being done under cygwin...
    alex

    Comment

    Working...