Hi!
Could you tell us, what exactly problems have you met with /vd2 flag? In
generally, it's not a dummy flag, which makes "magic things", it's well
described here: http://msdn.microsoft.com/en-us/library/7sf3txa8.aspx
So if you really would like to remove this flag, you have to know, that you
can't use dynamic_cast operator in your consturctors in that case. (I don't
know whether it's used somewhere in *mm projects or sigc++, you have to
check it).

2014-09-07 11:13 GMT+02:00 John Emmas <j...@creativepost.co.uk>:

> This is the conversation that was previously named:-
>
>     [Windows] Trash in sigc::trackable::callback_list_ when class is
> derived from Glib::Object
>
> (mostly, a discussion between Marcin Kolny and myself).  After a bit of
> detective work we eventually concluded that where a programmer derives a
> class from Glib::Object (when building with MSVC) it's necessary to set the
> compiler flag "/vd2" during compilation. Marcin gave this simple example:-
>
> class Test : public Glib::Object
> {
> public:
>     Test()
>     {
>     }
> };
>
> When instantiating the above class, we could see that the member variable
> 'callback_list_' wasn't getting initialised correctly with most versions of
> MSVC.  Adding the flag '/vd2' fixed the problem.  I checked the higher
> level libraries (atkmm / gdkmm / pangomm / gtkmm) and discovered that all
> except for cairomm do indeed have this flag set during compilation.  So it
> seemed reasonable to apply it to my own programs (wherever they might
> declare objects derived from Glib::Object).  It certainly seemed to do the
> trick for the above example.
>
> However...  I'm noticing that for more complex programs, the 'vd2' flag
> tends to cause strange runtime crashes - especially so in libsigc++
> (remember that the variable 'callback_list_' is of type
> 'sigc::trackable').  Currently I'm not building libsigc++ with the '/vd2'
> flag enabled.  Maybe I should be??  Is there any official advice regarding
> this for MSVC devs?  At the moment, adding that flag seems to have caused
> me a lot more problems than it solves... :-(
>
> Thanks, John
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtkmm-list
>



-- 
Pozdrawiam
Marcin Kolny
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to