[Xfc-dev] Re: Bit of a compile problem with XFC
Jasper Huijsmans
jasper at xfce.org
Fri Apr 22 09:48:32 CEST 2005
On Thu, Jul 14, 2005 at 10:22:44AM +0000, Jeff Franks wrote:
> >
> Gareth, XFC wont compile with gcc 3.3.5 because there was a bug in
> stl_construct.h that was fixed in gcc 3.4.0. Two choices, use gcc 3.4.x,
> or easier still if you have root access, in your file
> </usr/include/c++/3.3/bits/stl_construct.h> at line 78 insert a scope
> resolution operator in front of operator new so that it reads:
>
> ::new(static_cast<void*>(__p)) _T1(__value);
>
> instead of:
>
> new(static_cast<void*>(__p)) _T1(__value);
>
> and XFC will compile.
>
Hey Jeff, this is starting to be a real FAQ, isn't it?
I wonder if it would be possible to override the prototype for new when
compiling with gcc < 3.4. I'm totally without knowledge on C++, so this may be
absolute nonsense, but I was think of something like:
#if GCC_CMAJOR_VERSION < 4 && GCC_MINOR_VERSION < 4
// override prototype new operator
::new (whatever)
#endif
or something to that effect...
Jasper
More information about the Xfc-dev
mailing list