Gtkmm error with linking step
<p>Today i have tried to write a simple HelloWorld program
in c++ using gtkmm library. When i tried to compile using:</p>

<pre><code>g++ `pkg-config --cflags --libs gtkmm-3.0` main.cc  -o main
</code></pre>

<p>the linker show me this:</p>

<pre><code>/tmp/ccY4sTsR.o: nella funzione "main":
main.cc:(.text+0x36): undefined reference "Gtk::Main::Main(int&amp;, char**&amp;, bool)"
main.cc:(.text+0x50):undefined reference to"Gtk::Window::Window(Gtk::WindowType)"
main.cc:(.text+0x65): undefined reference  "Glib::ustring::ustring(char const*)"
main.cc:(.text+0x78): undefined reference to "Gtk::Window::set_title(Glib::ustring const&amp;)"
main.cc:(.text+0x84): undefined reference  to"Glib::ustring::~ustring()"
main.cc:(.text+0x97): undefined reference  to"Gtk::Main::run(Gtk::Window&amp;)"
main.cc:(.text+0xa8): undefined reference  to "Gtk::Main::~Main()"
main.cc:(.text+0xda): reference not defined to "Glib::ustring::~ustring()"
main.cc:(.text+0xeb): reference not defined to "Gtk::Main::~Main()"
collect2: error: ld returned 1 exit status
</code></pre>

<p>so i checked if the libgtkmm-2.0 was installed using:</p>

<pre><code>dpkg -l|grep gtkmm
</code></pre>

<p>and it showed me:</p>

<pre><code>ii  gtkmm-documentation                                         3.18.0-1                                                    all          Documentation of C++ wrappers for GLib/GTK+
ri  libgtkmm-2.4-1v5:amd64                                      1:2.24.4-2                                                  amd64        C++ wrappers for GTK+ (shared libraries)
ii  libgtkmm-2.4-dbg:amd64                                      1:2.24.4-2                                                  amd64        C++ wrappers for GTK+ (debug symbols)
ii  libgtkmm-2.4-dev:amd64                                      1:2.24.4-2                                                  amd64        C++ wrappers for GTK+ (development files)
ii  libgtkmm-2.4-doc                                            1:2.24.4-2                                                  all          C++ wrappers for GTK+ (documentation)
ri  libgtkmm-3.0-1v5:amd64                                      3.18.0-1                                                    amd64        C++ wrappers for GTK+ (shared libraries)
ii  libgtkmm-3.0-dbg:amd64                                      3.18.0-1                                                    amd64        C++ wrappers for GTK+ (debug symbols)
ii  libgtkmm-3.0-dev:amd64                                      3.18.0-1                                                    amd64        C++ wrappers for GTK+ (development files)
ii  libgtkmm-3.0-doc                                            3.18.0-1                                                    all          C++ wrappers for GTK+ (documentation)
</code></pre>

<p>the code of main.cc file is:</p>

<pre><code>#include &lt;gtkmm.h&gt;
#include &lt;gtkmm/window.h&gt;
#include &lt;gtkmm/main.h&gt;

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


    Gtk::Window* main_win = new Gtk::Window (Gtk::WINDOW_TOPLEVEL);
    main_win-&gt;set_title ("prove");


    if (main_win)
    {
        kit.run(*main_win);
    }
    return 0;
}
</code></pre>

<p>can anyone help me?? </p>