Activepython gcc and swig

S

stumblecrab

Hello,

I've looked at the swig example in the back of "programming python"
(Lutz). Using gcc to compile a swig wrapper I'm getting lots of
errors. Instead of using the cygwin python, I'm trying to point swig
to my activepython installation. I'm doing this because my modules are
all win32 installed, and not cygwin installed. Can anyone help me?

I'm pointing to C:/python24/include and C:/python24/Libs.


************* Here are the errors *******************

$ gcc -c example.c example_wrap.c -Ic:/python24/include
-Ic:/python24/Lib
In file included from c:/python24/include/Python.h:82,
from example_wrap.c:112:
c:/python24/include/intobject.h:41: error: parse error before
"PyInt_AsUnsignedL
ongLongMask"
c:/python24/include/intobject.h:41: warning: data definition has no
type or stor
age class
In file included from c:/python24/include/Python.h:84,
from example_wrap.c:112:
c:/python24/include/longobject.h:37: warning: parameter names (without
types) in
function declaration
c:/python24/include/longobject.h:39: error: parse error before
"PyLong_AsLongLon
g"
c:/python24/include/longobject.h:39: warning: data definition has no
type or sto
rage class
c:/python24/include/longobject.h:40: error: parse error before
"PyLong_AsUnsigne
dLongLong"
c:/python24/include/longobject.h:40: warning: data definition has no
type or sto
rage class
c:/python24/include/longobject.h:41: error: parse error before
"PyLong_AsUnsigne
dLongLongMask"
c:/python24/include/longobject.h:41: warning: data definition has no
type or sto
rage class
**************************************************************************************************
 
Joined
Apr 23, 2008
Messages
1
Reaction score
0
I had met the problem like you when I run gcc command.
And I found that the parameter '-mno-cygwin' can solved the problem.

try:
gcc -mno-cygwin -Ic:/python25/include -Lc:/python25/libs --shared example.c example_wrap.c c:/python25/libs/libpython25.a -o _example.pyd

This may help you.
8)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top