[Distutils] Compiling Python C++ extensions with MingW

Andrew Gregory Andrew.Gregory@npl.co.uk
Fri Dec 13 15:02:01 2002


Thanks for the reply. 

I had not realised that distutils does not support Mingw when compiling
C++

I searched for "gxx_personality" in files (using find). It's in
libstdc++.a and libsubc++.a which are in the directory C:\MinGW\bin

As soon as I've got time I'll have another go, but linking to these
files.


Andrew Gregory.


> -----Original Message-----
> From: David Abrahams [mailto:dave@boost-consulting.com]
> Sent: 11 December 2002 21:50
> To: M.-A. Lemburg
> Cc: Andrew Gregory; 'distutils-sig@python.org'
> Subject: Re: [Distutils] Compiling Python C++ extensions with MingW
> 
> 
> "M.-A. Lemburg" <mal@lemburg.com> writes:
> 
> > David Abrahams wrote:
> >> "M.-A. Lemburg" <mal@lemburg.com> writes:
> >>
> >>>>ap.cxx: undefined reference to `__gxx_personalit
> >>>>y_v0'
> >>>>dllwrap: gcc exited with status 1
> >>>>error: command 'dllwrap' failed with exit status 1
> >>>
> >>>Looks like some lib is missing. Hard to tell which without
> >>>a working MinGW installed :-)
> >> That's not just "some lib", but a part of the C++ runtime. 
> It may be
> >> as simple as setting LD_LIBRARY_PATH to include the location of the
> >> C++ runtimes shipped with mingw when linking.
> >
> > Patches are welcome. AFAIK, nobody is supporting MinGW for 
> distutils,
> > so you're on your own here.
> >
> > Could be that g++ needs to be used instead of gcc for compiling
> > C++ code... 
> 
> Yes, that is definitely the case.
> 
> > at least that's what the CVS log suggests. The MinGW class has gcc
> > hard-coded...
> 
> Easy fix, then!
> 
> -- 
>                        David Abrahams
>    dave@boost-consulting.com * http://www.boost-consulting.com
> Boost support, enhancements, training, and commercial distribution
> 

-------------------------------------------------------------------
This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW.
-------------------------------------------------------------------