A trivial Python SWIG error question

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2009-03-15T20:27:49Z Indexed on 2010/05/25 22:41 UTC
Read the original article Hit count: 244

Filed under:
|

I am trying to get Python running with swig to do C/C++. I am running the tutorial here, 'building a python module'. When I do the call

gcc -c example.c example_wrap.c -I /my_correct_path/python2.5

I get an error:

my_correct_path/python2.5/pyport.h:761:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
example_wrap.c: In function 'SWIG_Python_ConvertFunctionPtr':
example_wrap.c:2034: warning: initialization discards qualifiers from pointer target type
example_wrap.c: In function 'SWIG_Python_FixMethods':
example_wrap.c:3232: warning: initialization discards qualifiers from pointer target type

It actually does create an example.o file, but it doesn't work. I am using python2.5 not 2.1 as in the example, is this a problem? The error (everything else is just a 'warning') says something about wrong platform. This is a 64bit machine; is this a problem? Is my gcc configured wrong for my machine? How do I get past this?

UPDATE: I am still having problems. How do I actually implement this "fix"?

© Stack Overflow or respective owner

Related posts about python

Related posts about swig