[Python-Dev] building with C++

Anthony Baxter anthony at interlink.com.au
Thu Apr 13 03:09:25 CEST 2006


On Thursday 13 April 2006 10:59, Skip Montanaro wrote:
> > > Anthony> I've done a lot of the work to get Python to build
> > > with g++ -
> > >
> > > Is this on a branch or available as a patch somewhere?
> >
> > It's the trunk.
>> Is there a primer that will get me to where Anthony is? I tried
> the obvious
>> CC=g++ ./configure --with-cxx=g++

That's what I've been doing.
> and the build fails trying to compile Objects/genobject.c. From
> the sounds of Anthony's email he was at the point where it built
> and was having test problems.

The genobject.c error is new - I just fixed it, it was shallow.
The code is _nearly_ building fine. there's an issue in _sre.c with 
some code that either returns a Py_UNICODE* or an SRE_CHAR* (unsigned 
char*) in a void*. The code probably needs a refactoring to deal with 
that. There's also 
Python/compile.c: In function ‘int compiler_compare(compiler*, 
_expr*)’:
Python/compile.c:3065: error: invalid cast from type ‘void*’ to type 
‘cmpop_ty’
Python/compile.c:3075: error: invalid cast from type ‘void*’ to type 
‘cmpop_ty’
which I haven't looked at yet. Anyone else is welcome to fix these.
To get past those two, I've been building just those two files with 
gcc, with "make CC=gcc Python/compile.o Modules/_sre.o"


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /