title: libstdc++: DSO missing from command line
body: <p>I am having trouble implementing a gtkmm application's makefile. I have implemented a simple solution, however, I am getting the following error:</p>
  <blockquote>
  <p>g++ -Wall -std=c++11 <code>pkg-config gtkmm-3.0 --cflags</code> -c main.cpp</p>
  <p>cc   main.o  <code>pkg-config gtkmm-3.0 --libs</code> -o main</p>
  <p>/usr/bin/ld: main.o: undefined reference to symbol '__gxx_personality_v0@@CXXABI_1.3'</p>
  <p>/usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line</p>
  <p>collect2: error: ld returned 1 exit status</p>
  <p>: recipe for target 'main' failed</p>
  <p>make: *** [main] Error 1</p>
  </blockquote>
  <p>Makefile:</p>
  <pre><code># Compiler
  CXX = g++
  CXXFLAGS = -Wall -std=c++11 `pkg-config gtkmm-3.0 --cflags`
  
  # gtkmm library flags
  LDLIBS = `pkg-config gtkmm-3.0 --libs`
  
  PROGRAM = main
  SRCS = $(wildcard *.cpp)
  OBJS = $(SRCS:.cpp=.o)
  DEPEND = .depend
  
  .PHONY: clean
  
  $(PROG): $(OBJS)
      $(CXX) $^ -o $@ $(LDLIBS)
  
  # Object file rules:
  .cpp.o:
      $(CXX) $(CXXFLAGS) -c $&lt;
  
  # Dependencies
  .depend:
      rm -f ./.depend
      $(CXX) $(CXXFLAGS) -MM $(SRCS) &gt; $(DEPEND)
  
  all: .depend $(PROGRAM)
  
  clean:
      rm -f $(OBJS)
      rm -f $(PROGRAM)
      rm -f $(DEPEND)
  
  -include $(DEPEND)
  </code></pre>
  <p>main.cpp:</p>
  <pre><code>#include &lt;gtkmm/application.h&gt;
  
  #include &quot;MainWindow.hpp&quot;
  
  int main(int argc, char *argv[]) {
    Glib::RefPtr&lt;Gtk::Application&gt; app = Gtk::Application::create(argc, argv, &quot;org.gtkmm.examples.base&quot;);
  
    MainWindow window;
  
    // Show windows and return when closed
    return app-&gt;run(window);
  }
  </code></pre>
  <p>MainWindow.hpp:</p>
  <pre><code>#ifndef GUI_MAIN_WINDOW_H
  #define GUI_MAIN_WINDOW_H
  
  #include &lt;gtkmm.h&gt;
  
  class MainWindow: public Gtk::Window {
  
    public:
      MainWindow();
      virtual ~MainWindow();
  
    protected:
      Gtk::Frame frame;
  
  };
  
  #endif // GUI_MAIN_WINDOW_H
  </code></pre>
  <p>MainWindow.cpp:</p>
  <pre><code>#include &quot;MainWindow.hpp&quot;
  
  MainWindow::MainWindow() {
    // Set window properties
    set_title(&quot;Main window&quot;);
    set_size_request(300, 300);
  
    // Set window border width
    set_border_width(10);
  
    // Add frame
    add(frame);
  
    // Set frame's label
    frame.set_label(&quot;Frame&quot;);
  
    // Align the label at the right of the frame
    frame.set_label_align(Gtk::ALIGN_END, Gtk::ALIGN_START);
  
    // Set the style of the frame
    frame.set_shadow_type(Gtk::SHADOW_ETCHED_OUT);
  
    show_all_children();
  }
  
  MainWindow::~MainWindow() {
    // Nothing to do here
  }
  </code></pre>
  <p>What am I doing wrong?</p>