title: Stroustrup's Simple_window.h
body: <p>I am trying to get the graphics examples to work from Stroustrup's Principles and Practices ...C++, to no avail (yet). I have installed the fltk stuff, and know that is working fine as I managed to get a window to display using with a program suggested in the appendix of his book:</p>
  
  <pre><code>#include &lt;FL/Fl.H&gt;
  #include &lt;FL/Fl_Box.H&gt;
  #include &lt;FL/Fl_Window.H&gt;
  
  int main(){
  
      Fl_Window window(200,200, "title here");
      Fl_Box box(0,0,200,200,"Hey, hello wrld");
      window.show();
      return Fl::run();
  }
  </code></pre>
  
  <p>However, trying my own using his Simple_window.h (can be found on his site) gives "reference to ‘Window’ is ambiguous", since it's already at usr/include/X11/X.h . So I tried specifying the namespace to the relevant one:</p>
  
  <pre><code>struct Simple_window : Graph_lib::Window {  //Changed Window to inc. namespace
      Simple_window(Point xy, int w, int h, const string&amp; title );
  
      bool wait_for_button(); // simple event loop
  
  .
  .
  .
  </code></pre>
  
  <p>But this gives me a bunch more errors I don't understand:</p>
  
  <pre><code>$ clear; g++ -Wno-deprecated window.cpp -o holz
      /tmp/ccIFivNg.o: In function `main':
      window.cpp:(.text+0x64): undefined reference to `Simple_window::Simple_window(Point, int, int, String const&amp;)'
      /tmp/ccIFivNg.o: In function `Graph_lib::Window::~Window()':
      window.cpp:(.text._ZN9Graph_lib6WindowD2Ev[_ZN9Graph_lib6WindowD5Ev]+0x14): undefined reference to `vtable for Graph_lib::Window'
  </code></pre>
  
  <p>etc.</p>
  
  <p>I feel mastering graphics is going to be a long and rocky road -_-</p>