I successfully compiled the following program simple.cc:
#include <gtkmm.h>
int main (int argc, char *argv[])
{
Glib::RefPtr<Gtk::Application> app =
Gtk::Application::create(argc, argv,
"org.gtkmm.examples.base");
Gtk::ApplicationWindow window;
return app->run(window);
}
using the following command:
g++ simple.cc -o simple `pkg-config gtkmm-3.0 --cflags --libs`
Which gave me the executable simple, but when I tried to run it, I got the following error:
(simple:2964): GLib-GIO-CRITICAL **: g_application_list_actions: assertion `application->priv->is_registered' failed
Segmentation fault (core dumped)
As far as I can tell, I have the latest and greatest GLib packages. I'm running Ubuntu 12.04 LTS.
I had the same problem as I have just started on the same tutorial. Replace:
Gtk::ApplicationWindow window;
with
GTK::Window window;
If you read the description of the code in the tutorial the latter is actually the code that is discussed. Making this change made the program work for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With