[Distutils] Re: Compiling extensions with MingW32 / python.org binary

Paul Moore pf_moore at yahoo.co.uk
Wed Jan 14 16:05:41 EST 2004


Michael Droettboom <mdboom at jhu.edu> writes:

> Okay, the detail that I realise is important is that this is a C++
> extension.

Yes, that's pretty important :-) I don't use C++, so I didn't see
this.

> I seems that compiler_cxx should be defined as "gcc -mcygwin" and "gcc
> -mnocygwin" in cygwinccompiler.py.  I have a patch -- not sure what
> the procedure is to submit it, however.

The following works for me, for a trivial test:

--- cygwinccompiler.py.orig	2003-04-14 13:51:26.000000000 +0100
+++ cygwinccompiler.py	2004-01-14 21:00:33.000000000 +0000
@@ -108,6 +108,7 @@
         # XXX optimization, warnings etc. should be customizable.
         self.set_executables(compiler='gcc -mcygwin -O -Wall',
                              compiler_so='gcc -mcygwin -mdll -O -Wall',
+                             compiler_cxx='g++ -mcygwin -O -Wall',
                              linker_exe='gcc -mcygwin',
                              linker_so=('%s -mcygwin %s' %
                                         (self.linker_dll, shared_option)))
@@ -295,6 +296,7 @@
 
         self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
                              compiler_so='gcc -mno-cygwin -mdll -O -Wall',
+                             compiler_cxx='g++ -mno-cygwin -O -Wall',
                              linker_exe='gcc -mno-cygwin',
                              linker_so='%s -mno-cygwin %s %s'
                                         % (self.linker_dll, shared_option,

How does it compare with your patch?

You should submit your patch to sourceforge. On www.python.org,
there's a "bugs" link in the left hand sidebar, under the
"Documentation" section.

Thanks for persisting with this!

Paul.
-- 
This signature intentionally left blank




More information about the Distutils-SIG mailing list