error with gtkmm 3 in ubuntu 12.04

i install libgtkmm-3.0-dev in ubuntu 12.04 and i try to learn and write program with c++ and gtkmm 3 i go to this link "" and try to compile simple example program :

#include <gtkmm.h>

int main(int argc, char *argv[])
  Glib::RefPtr<Gtk::Application> app =
    Gtk::Application::create(argc, argv,

  Gtk::ApplicationWindow window;

  return app->run(window);

my file name is "" and i open terminal and type following command to compile:

g++ -o basic `pkg-config gtkmm-3.0 --cflags --libs`

compile completed without any error but when i try to run program with type ./basic in terminal i get following error :

~$ ./simple
./simple: symbol lookup error: ./simple: undefined symbol:_ZN3Gtk11Application6createERiRPPcRKN4Glib7ustringEN3Gio16ApplicationFlagsE

how can i solve this problem ?

i can cimpile any gtkmm 2.4 code with this command : " g++ -o basic pkg-config gtkmm-3.0 --cflags --libs " and this command : " g++ -o basic pkg-config gtkmm-2.4 --cflags --libs "



I think you hit this gtkmm bug, apparently triggered by more recent versions of GTK+, and now fixed:

I have asked Ubuntu to update their package, but they are usually slow about that if they do it at all:

You might want to try reinstalling libgtkmm-3.0-dev. The code compiles fine for me but I get a Seg Fault. It does work when I change Gtk::ApplicationWindow to Gtk::Window.

there is nothing wrong with your install. that code is bad.

try it again, using

Gtk::Window window;

instead of the ApplicationWindow. When the GNOME documentation for a given class has a description of "TODO", that's a bad thing.

Need Your Help

std::getline for an ifstream, using parameter string or char *

c++ string

I am using fstream to read or write into a file.

How is new version of an ASPX file compiled and loaded into the application?

Upon serving a request for an ASPX page, if ASP.NET notices any change to that page, it will automatically recompile the page into an assembly and use that new page definition to handle to the requ...