title: fstream linking error in g++ with -std=gnu++0x
body: <p>I'm have an application built with the -std=gnu++0x parameter in tdm-mingw g++ 4.4.0 on windows.</p>
  
  <p>It is using an ofstream object and when I build, it gives the following linking error:</p>
  
  <pre><code>c:\opt\Noddler/main_func.cpp:43: undefined reference to `std::basic_ofstream&lt;char, std::char_traits&lt;char&gt; &gt;::basic_ofstream(std::string const&amp;, std::_Ios_Openmode)'
  </code></pre>
  
  <p>It builds properly when using the default older standard.</p>
  
  <p>This is the only error, and trying to link with -lstdc++ doesn't help. Has someone experienced this before? Can I get any suggestions?</p>
  
  <p>Edit: 
  I'm creating an ofstream object like this:</p>
  
  <pre><code>std::string filename = string("noddler\\") + callobj.get_ucid() + "_" + callobj.gram_counter() + ".grxml";
  ofstream grxml_file(string("C:\\CWorld\\Server\\Grammar\\") + filename);
  ...
  grxml_file.close();
  </code></pre>
  
  <p>It is getting compiled fine, but not getting linked.</p>