title: Eclipse and Gtkmm - "undefined reference to"
body: <p>I use Eclipse and I wanted to use gtkmm in it. I have following code:</p>
  
  <pre><code>#include &lt;gtkmm.h&gt;
  #include &lt;iostream&gt;
  
  int main(int argc, char *argv[]) {
      Gtk::Main kit(argc, argv);
  
      Gtk::Window mainWindow;
  
      Gtk::Button button("Click here");
  
      mainWindow.set_title("Eclipse/GTKmm Demo");
      mainWindow.set_border_width(4);
      mainWindow.set_default_size(200, 50);
  
      mainWindow.add(button);
      button.show();
  
      Gtk::Main::run(mainWindow);
  
      return 0;
  }
  </code></pre>
  
  <p>I added <code>pkg-config --cflags --libs gtkmm-3.0</code> (with grave accents, of course) to Cross G++ Compiler Miscellanous options into Other flags and the same to the Cross G++ Compiler Miscellanous options into Linker flags. And it doesn't work!</p>
  
  <p>Here's the compile log:</p>
  
  <pre><code>**** Build of configuration Debug for project User Directory Changer ****
  
  make all 
  Building file: ../main.cpp
  Invoking: Cross G++ Compiler
  g++ -O0 -g3 -Wall -c -fmessage-length=0 `pkg-config --cflags --libs gtkmm-3.0` -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.cpp"
  Finished building: ../main.cpp
  
  Building target: User Directory Changer
  Invoking: Cross G++ Linker
  g++ `pkg-config --cflags --libs gtkmm-3.0` -o "User Directory Changer"  ./main.o   
  ./main.o: In function `main':
  /home/m4tx1/Dropbox/Projects/User Directory Changer/Debug/../main.cpp:12: undefined reference to `Gtk::Main::Main(int&amp;, char**&amp;, bool)'
  /home/m4tx1/Dropbox/Projects/User Directory Changer/Debug/../main.cpp:14: undefined reference to `Gtk::Window::Window(Gtk::WindowType)'
  /home/m4tx1/Dropbox/Projects/User Directory Changer/Debug/../main.cpp:16: undefined reference to `Glib::ustring::ustring(char const*)'
  /home/m4tx1/Dropbox/Projects/User Directory Changer/Debug/../main.cpp:16: undefined reference to `Gtk::Button::Button(Glib::ustring const&amp;, bool)'
  /home/m4tx1/Dropbox/Projects/User Directory Changer/Debug/../main.cpp:16: undefined reference to `Glib::ustring::~ustring()'
  /home/m4tx1/Dropbox/Projects/User Directory Changer/Debug/../main.cpp:18: undefined reference to `Glib::ustring::ustring(char const*)'
  [etc...]
  collect2: ld returned 1 exit status
  make: *** [User Directory Changer] Error 1
  
  **** Build Finished ****
  </code></pre>
  
  <p>And I don't know why... When I compile it in terminal by: <code>g++ -O0 -g3 -Wall -c -fmessage-length=0 'pkg-config --cflags --libs gtkmm-3.0' -o ./test ./main.cpp</code> it works...</p>