title: How to use of FLTK in-box.get_string()
body: <p>The following code is a small part of an app. For that app I need to use of <em>in_box.get_string()</em>. The declaration and definition of in_box are in <a href="http://www.stroustrup.com/Programming/Graphics/" rel="nofollow">this</a> address in <em>GUI.h</em> and <em>GUI.cpp</em> files.   </p>
  
  <p>For integers, it works fine. That is, if I use <em>in_box.get_int()</em> it gets the number entered to the <em>in_box</em> and returns that number as an <code>integer</code>. But the problem is that, it doesn't work for <code>strings</code>, as is expected. And when using strings, I get errors! </p>
  
  <p>For example in code below I have used a <code>string</code> <em>s</em>.      </p>
  
  <pre><code>#include &lt;GUI.h&gt;
  #include &lt;iostream&gt;
  using namespace Graph_lib;
  
  class Calculator : public Window {
  public:
      Calculator(Point, int, int, const string&amp;);
  
  private:
      //Widgets
      Button show_button;
      In_box enter_box;
  
      void show() { getstr(); cout &lt;&lt;s; }
  
      void getstr() {
          s = enter_box.get_string();
      }
  
    static void cb_show(Address, Address pw) { reference_to&lt;Calculator&gt;(pw).show(); }
    string s;
  };
  
  //---------------------------------------------------------------------
  
  Calculator::Calculator(Point xy, int w, int h, const string&amp; title):
      Window(xy, w, h, title),
      show_button(Point(x_max()-110, 440), 90, 35, "Show", cb_show),
      enter_box(Point(x_max()-400, 158), 245, 40,  "Enter"){
  
      attach(enter_box);
      attach(show_button);
  }
  
  int main()
  {
      Calculator cal(Point(100,100), 600, 500, "Calculator");
      return gui_main();
  }
  </code></pre>
  
  <p>There are 8 <em>warnings</em> and two <em>errors</em>. Errors are these:</p>
  
  <blockquote>
    <p><em>Error    9  error LNK2019: unresolved external symbol "public: class std::basic_string,class
    std::allocator > __thiscall Graph_lib::In_box::get_string(void)"
    (?get_string@In_box@Graph_lib@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
    referenced in function "private: void __thiscall
    Calculator::getstr(void)"
    (?getstr@Calculator@@AAEXXZ)  C:\Users\ME\documents\visual studio
    2012\Projects\test_3\test_3\test_3.obj Error  10  error LNK1120: 1
    unresolved externals  C:\Users\ME\documents\visual studio
    2012\Projects\test_3\Debug\test_3.exe</em></p>
  </blockquote>
  
  <p>The errors say, that is a linker problem but my <em>linker input</em>'s file list is as follows and it has worked (almost) fine so far.</p>
  
  <p><em>fltkd.lib<br>
  wsock32.lib<br>
  comctl32.lib<br>
  fltkjpegd.lib<br>
  fltkimagesd.lib</em>  </p>
  
  <p>My compiler is MS VS 2012. And machine is Win 7.</p>
  
  <p>Does anyone know how to solve the problem please?</p>