(win32) missing files, incorrect options and more



Over the last couple of days I have been trying to get some of my
gtkmm based apps to compile and work on the win32 platform. However, I
ran into several issues I'd like to share ;) In order to tackle the
exact location of failure I write the following small application:

// ------------------------------------
#pragma warning (disable : 4250)

#include <gtkmm.h>
#include <libglademm.h>

int main(int argc, char *argv[])
{
  Gtk::Main kit(argc, argv);

  Glib::RefPtr<Gnome::Glade::Xml> refXml =
    Gnome::Glade::Xml::create("window.glade", "window1");	

  return 0;
}
// ------------------------------------

I've setup a build environment with both MSVC 2005 and MINGW. The
application shown above works just fine with MINGW. The real problems
are on the MSVC side of the story. To start with, the result of 

pkg-config.exe --cflags --libs libglademm-2.4 --msvc-syntax

is not correct as MSVC does not recognize "-mms-bitfields" and
"/libpath:c:/GTK/lib" options and yielded by pkg-config. Next issue,
glademm-2.4.lib and cairo.lib are not available. The 'solution' is to
a) just remove the unrecognized options, b) prefix the libs with the
libpath manually, and c) remove the libs missing libs (glademm and
cairo). As a result I am able to compile and link the program, but
at runtime I get a:

(test:4056): GLib-GObject-CRITICAL **: g_object_set_qdata_full:
  assertion `quark > 0' failed

and when debugging the MSVC tells me that it encountered an 'access
violation' and inspecting the callstack shows that the problem is in
"Gnome::Glade::Xml::create(..) -> Gnome::Glade::Xml(..)" -> and then
dives into libxml2 but there are no debug version included in the
gtkmm-win32 distribution..




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