Question

I'm trying to load a very basic Glade file from the same directory. However, Gtk::Builder always fails and aborts with

terminate called after throwing an instance of 'Gtk::BuilderError'

even though I surrounded everything in a try statement.

Just for clarity, the source is at http://pastebin.com/hRBuAi2d, and the glade file at http://pastebin.com/c9ZvgbWi.

Is the Gtkmm I have broken? That's the only reasoning I can come up with.

Was it helpful?

Solution

After changing id="window1" to id="mainwindow" in your ui file, it ran fine here.

You are trying to ref_builder->get_widget('mainwindow', win) where your window is actually called "window1" in the ui file.

Edit: though I am on Linux x64, not windows.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top