Re: Why this code doesn't work?



On 22/12/2015 00:36, codekiddy wrote:
Hey guys I solved all the issues and would like to share my findings!!

Recently I made several posts here on gtkmm-list having problems with GTKMM on Windows with msvc builds, so as if
#define GTKMM_ATKMM_ENABLED is defined during compilation there will be a runtime crash and
destruction problem with Glib::RefPtr<Pango::Layout> layout;

The problem was that I compiled ATKMM and PANGOMM with /vd2 compiler switch, and that was causing program shutdown crash in Atk::~Implementor and Layout::~Layout

I recompiled these 2 without the /vd2 option and with GTKMM_ATKMM_ENABLED 1, now everything works just fine :D



Hi codekiddy,

This is a total guess - but if we think back to your problems with GTKMM_ATKMM_ENABLED you'll remember we concluded that it needs to be defined identically everywhere.  You can't have it defined in some modules but undefined in others.  If that happens, the size of Gtk::Widget will be different in different modules (that's what was causing your crash).  In fact I suggested using a "Force Include" header file to make sure it'll always be the same everywhere.

Maybe there's a similar requirement for /vd2?  I noticed that it's defined for all these VC projects:-

glibmm
giomm
atkmm
pangomm
gdkmm
gtkmm

but interestingly - not for cairomm.  I've no idea if that's a possible explanation.  Just flagging it up as a discrepancy.

And if /vd2 is enabled for the "mm" libraries, does that mean you must also enable it for your own application?  Maybe someone here can tell us.

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]