Re: gtkmm with VS2005 vd2 option
- From: stotz gmx ch (Urs Stotz)
- To: gtkmm-list gnome org
- Subject: Re: gtkmm with VS2005 vd2 option
- Date: Sat, 4 Oct 2008 00:56:43 +0200
On Fri, Oct 03, 2008 at 10:45:28PM +0200, Armin Burgmeier wrote:
> On Fri, 2008-10-03 at 18:21 +0200, Stotz Urs (ENT) wrote:
> > On Wed, Oct 01, 2008 at 03:56:35PM +0200, Stefani Leonardo wrote:
> > >
> > > I am trying to compile an gtkmm 2.12 program with /vd2 option
> > > [...]
> > > /vd2 is mandatory on gtkmm programs?
> >
> > MSDN say: /vd supports incorrect behavior in an early version of Visual
> > C++, and is no longer needed.
> >
> >
> > - Microsoft Visual Studio 2008/.NET Framework 3.5
> > http://msdn.microsoft.com/en-us/library/7sf3txa8.aspx
> > /vd supports incorrect behavior in an early version of Visual C++, and
> > is no longer needed.
>
> This very page says for /vd2:
>
> "Allows you to use dynamic_cast Operator on an object being constructed.
> For example, a dynamic_cast from a virtual base class to a derived
> class."
>
> which is exactly what gtkmm does, IIRC (although I'm not sure where, and
> it seems not to be mentioned in the bug). This is why /vd2 is required
> for applications using gtkmm.
>
[...]
> > I think you don't need /vd2 for Visual Studio 2005 and higher any more.
>
> I don't think so. But feel free to try out.
I try with Cedric Gustins test example:
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101134
builded with: cl /vd2 /Zi /MDd /EHsc vd2_or_not.cxx
test ok:
1. Testing a Base object
Inside constructor:
this = 0012FF38, dynamic_casted this = 0012FF38
Outside constructor:
this = 0012FF38, dynamic_casted this = 0012FF38
2. Testing a Derived object
Inside constructor:
this = 0012FF48, dynamic_casted this = 0012FF48
Outside constructor:
this = 0012FF48, dynamic_casted this = 0012FF48
builded with: cl /Zi /MDd /EHsc vd2_or_not.cxx
test failed:
1. Testing a Base object
Inside constructor:
this = 0012FF40, dynamic_casted this = 0012FF40
Outside constructor:
this = 0012FF40, dynamic_casted this = 0012FF40
2. Testing a Derived object
Inside constructor:
this = 0012FF4C, dynamic_casted this = 0012FF50
dynamic_cast<> seems to have failed.
Outside constructor:
this = 0012FF4C, dynamic_casted this = 0012FF4C
you are right.
Regards,
Urs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]