Re: compiling gtkmm with atkmm support fails in implementor.cc



--enable-api-atkmm just defines GTKMM_ATKMM_ENABLED in gtkmmconfig.h and config.h. That's all it does. And you don't have to worry about config.h. It's not even distributed. I suppose you don't use it. To choose between a build with or without atkmm functionality, all you have to do is define or not define GTKMM_ATKMM_ENABLED in gtkmmconfig.h, and recompile all files that include gtkmmconfig.h.

You mentioned in an earlier post that the error you see is a double deletion of some memory. I've never built gtkmm with MSVC myself, but I've understood that MSVC is better than gcc-compiled programs at detecting errors in allocation and deallocation of dynamic memory. Therefore I ran the toolbar example program in the gtkmm tutorial (which allocates some widgets on the heap) with valgrind. It reported some lost (leaked) memory. That's normal with programs that use glib and gtk+. No other memory problems. And I checked with gdb that Atk::Implementor::~Implementor() was called several times.

Kjell

Den 2015-11-17 kl. 06:18, skrev codekiddy:
Hi John, and thank you so much for input!

I'm building from MSVC project file, and have just now double checked everything.

I've already taken care of the "undef GTKMM_ATKMM_ENABLED" you mentioned,
and replaced that line with either:

#define GTKMM_ATKMM_ENABLED 1

or commented out:

// #define GTKMM_ATKMM_ENABLED 1

First case gives runtime error when closing windows, second case (commented out) works fine.

but I noticed some other thing, the comment above this macro says:

/* Defined when the --enable-api-atkmm configure argument was given */

So by using some logic it looks that gtkmm is supposed to be built without atkmm support if building with msvc
project file without doing ./configure --enable-api-atkmm first.

therefore to build with atkmm support I'm also supposed to configure sources with --enable-api-atkmm first?

Can somebody confirm this?
I thought defining that macro to is enough to enable atkmm API's with gtkmm.

Thank you so much!




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