By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,772 Members | 906 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,772 IT Pros & Developers. It's quick & easy.

MinGW building with Python 2.4

P: n/a
Ok, I know there are already a million posts on this group about
getting Python to build with MinGW. I've been through many of them, and
have still not found a good comprehensive way to accomplish this.

I've got Cygwin 5.1 with GCC 3.3.3 on it. I'm using Python 2.4.

Note: You invoke the mingwin compiler *indirectly*, by running gcc with
the -mno-cygwin option.

So first of all, I tried exporting CC='gcc -mno-cygwin', configuring,
and making. You end up getting file-not-found errors, because some of
the include files aren't present for mingw.

Next: I tried pymingw: didn't work :(

Any ideas?

Thanks in advance,
--Steve (mr************@hotmail.com)

Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
mrstephengross wrote:
Ok, I know there are already a million posts on this group about
getting Python to build with MinGW. I've been through many of them, and
have still not found a good comprehensive way to accomplish this.

I've got Cygwin 5.1 with GCC 3.3.3 on it. I'm using Python 2.4.

Note: You invoke the mingwin compiler *indirectly*, by running gcc with
the -mno-cygwin option.

So first of all, I tried exporting CC='gcc -mno-cygwin', configuring,
and making. You end up getting file-not-found errors, because some of
the include files aren't present for mingw.

Next: I tried pymingw: didn't work :(

Any ideas?


Since the only official way to do this is pymingw, you should at least
give feedback of the steps you followed, and what didn't work

David
Jul 18 '05 #2

P: n/a
> Since the only official way to do this is pymingw, you should at
least
give feedback of the steps you followed, and what didn't work


(1) I have Cygwin 5.1 with GCC 3.3.1 on it.
(2) I unzipped Python 2.4.
(3) I unzipped pyMinGW-24-0064.zip into that directory, overwriting the
appropriate files.
(4) I went into the [Python]/MinGW directory and ran 'make -f
python24.mak all'.
(5) Here are the results:

make -f pythoncore.mak
make[1]: Entering directory
`/home/Administrator/sgross/Python-2.4/MinGW'
gcc.exe -c ../Modules/_bisectmodule.c -o ../Modules/_bisectmodule.o
-I"../Include" -I"../PC" -I"../Python" -Wall -s -DNDEBUG
-DPy_BUILD_CORE -DPy_ENABLE_SHARED -O2
In file included from ../Include/Python.h:82,
from ../Modules/_bisectmodule.c:6:
.../Include/intobject.h:41: error: parse error before
"PyInt_AsUnsignedLongLongMask"
.../Include/intobject.h:41: warning: type defaults to `int' in
declaration of `PyInt_AsUnsignedLongLongMask'
.../Include/intobject.h:41: warning: data definition has no type or
storage class
In file included from ../Include/Python.h:84,
from ../Modules/_bisectmodule.c:6:
.../Include/longobject.h:37: warning: parameter names (without types) in
function declaration
.../Include/longobject.h:39: error: parse error before
"PyLong_AsLongLong"
.../Include/longobject.h:39: warning: type defaults to `int' in
declaration of `PyLong_AsLongLong'
.../Include/longobject.h:39: warning: data definition has no type or
storage class
.../Include/longobject.h:40: error: parse error before
"PyLong_AsUnsignedLongLong"
.../Include/longobject.h:40: warning: type defaults to `int' in
declaration of `PyLong_AsUnsignedLongLong'
.../Include/longobject.h:40: warning: data definition has no type or
storage class
.../Include/longobject.h:41: error: parse error before
"PyLong_AsUnsignedLongLongMask"
.../Include/longobject.h:41: warning: type defaults to `int' in
declaration of `PyLong_AsUnsignedLongLongMask'
.../Include/longobject.h:41: warning: data definition has no type or
storage class
make[1]: *** [../Modules/_bisectmodule.o] Error 1
make[1]: Leaving directory
`/home/Administrator/sgross/Python-2.4/MinGW'
make: *** [pythoncore] Error 2

Any ideas?

Thanks in advance,
--Steve

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.