title: undefined reference to `Class::Class()'
body: <p>I am writing a GTKmm window program; the main window creates two buttons, one for English and one for Chinese. The user can click on the button to bring up a different window in the appropriate language. Currently I am having trouble initializing the multiple-item container inside the main window. It is an object of type MainWindowPane, which inherits Gtk::HBox.</p>
  
  <p>When I try to make, the compiler issues the following error:  </p>
  
  <pre><code>$ make 
  g++ -g `pkg-config gtkmm-2.4 --cflags` -c MainWindow.cpp  
  g++  -g -o QPI_frontend main.o MainWindow.o StartButton.o `pkg-config gtkmm-2.4 --libs`  
  MainWindow.o: In function `MainWindow':  
  /home/dmurvihill/Documents/QPI_frontend/MainWindow.cpp:9: undefined reference to   `MainWindowPane::MainWindowPane()'  
  /home/dmurvihill/Documents/QPI_frontend/MainWindow.cpp:9: undefined reference to  `MainWindowPane::MainWindowPane()'  
  collect2: ld returned 1 exit status  
  make: *** [QPI_frontend] Error 1  
  </code></pre>
  
  <p>I am using the latest version of gcc with pkg-config to include the proper libraries. I am also a java person.</p>
  
  <pre><code>/*
   * MAIN_WINDOW.H
   * Responsible for creating "slave" RSED windows. Can create English or Chinese
   * versions of the demo, and can destroy them all with one click.
   */  
  #ifndef MAINWINDOW_H  
  #define MAINWINDOW_H  
  
  #include &lt;gtkmm/window.h&gt;
  
  //#include "SlaveWindow.h"
  #include "StartButton.h"
  #include "MainWindowPane.h"
  
  class MainWindow : public Gtk::Window
  {
  public:
      MainWindow();   
  private:
      MainWindowPane pane;
  //  std::list&lt;SlaveWindowThread&gt; windows;       // Keeps track of all windows that have been created thus far.
      void destroyAllWindows();           // Iterates through the linked list and destroys each window.
  };
  #endif      //ifndef MAINWINDOW_H
  </code></pre>
  
  <hr>
  
  <pre><code>/* 
   * MAIN_WINDOW.CPP
   *
   */  
  #include "MainWindow.h"  
  #include "MainWindowPane.h"  
  #include "StartButton.h"  
  
  MainWindow::MainWindow()// : /*list,*/ pane(/*list*/)
  {
      pane;
  }
  
  void MainWindow::destroyAllWindows()
  {
      //gtk_widget_destroy(*this);
      // TODO: Destroy all the other windows too.
  }
  </code></pre>
  
  <hr>
  
  <pre><code>/*
   * MAIN_WINDOW_PANE.H
   */  
  #ifndef MAINWINDOWPANE_H  
  #define MAINWINDOWPANE_H  
  
  #include &lt;gtkmm/box.h&gt;
  #include &lt;gtkmm/button.h&gt;
  
  //#include "SlaveWindow.h"
  #include "StartButton.h"
  
  class MainWindowPane : public Gtk::HBox
  {
  public:
      MainWindowPane(/*&amp;(std::list)*/);   
  private:
      StartButton englishButton;      // Used to create a new RSED demo screen.
      StartButton chineseButton;      // Used to create a new RSED demo in chinese.
  //  std::list&lt;SlaveWindow&gt; windows;     // Keeps track of all windows that have been created thus far.
      void destroyAllWindows();       // Iterates through the linked list and destroys each window.
  };
  #endif      //ifndef MAINWINDOWPANE_H
  </code></pre>
  
  <hr>
  
  <pre><code>/* 
   * MAIN_WINDOW.CPP
   *
   */  
  #include "MainWindowPane.h"  
  #include "StartButton.h"  
  
  MainWindowPane::MainWindowPane(/*&amp;(std::list)*/) : 
      englishButton(StartButton::ENGLISH/*,&amp;(std::list)*/), 
      chineseButton(StartButton::CHINESE/*,&amp;(std::list)*/)
  {
      pack_start(englishButton);
      englishButton.show();
      pack_start(chineseButton);
      chineseButton.show();
  }
  
  void MainWindow::destroyAllWindows()
  {
      //gtk_widget_destroy(*this);
      // TODO: Destroy all the other windows too.
  }
  </code></pre>