Re: [gtkmm] Re: Is Gtkmm stable and mature on Win32?



Ney André de Mello Zunino wrote:

The final step was trying to build a simple GUI using Glade. I did so and, at first, tried exporting it to C++ code, but it failed and showed me a message asking me to check whether I had glade-- installed, which I do (glademm V2.6.0_cvs). Anyway, I decided to try out my glade file with libglademm (which is the way I intend to go in my actual project). So, I wrote the following, minimal program:

I had other reports of people having problems with glade--. Did you install gtkmm in the same directory as GTK+ and checked the "Register environments variables" option ? The directory that contains glade--.exe must be in your PATH.

Anyway, you might also want to replace the glade--.exe executable with this one that fixes some path manipulation problems on win32

http://www.pcpm.ucl.ac.be/~gustin/win32_ports/binaries/glademm-2.6.0_cvs.zip

Make sure that Users have read/execute access to the file (if you're on a win2k/winxp pro box).


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

int main(int argc, char *argv[])
{
  Glib::RefPtr<Gnome::Glade::Xml> refXml =
    Gnome::Glade::Xml::create("teste.glade");
  return 0;
}

I tried to build it with:

g++ -o teste teste.cpp `pkg-config gtkmm-2.4 --cflags --libs`

You should use `pkg-config libglademm-2.4 --cflags --libs` instead.

Anyway, by manually adding the include dir and lib file, I was finally able to build my simple test application. However, upon the first execution attempt, I got an error saying that I needed to call g_type_init() before the call in my main(). I did so, but then I was bombarded with tons of CRITICAL errors. The initial lines read:

Actually, you have to call Gtk::Main my_app(argc, argv) in main. See the examples in the libglademm source tarball.

Cedric



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