Undefined reference to foo::bar static ofstream
<p>I've been trying to compile a program I've spent the past three days building, and I can't figure out how to get it to stop throwing an error.  I keep getting the compile error "undefined reference to Foo::bar" where "bar" is a static ofstream declared in the Foo.h file.</p>

<p><strong>Foo.h</strong></p>

<pre><code>Class Foo
{
    public:
          &lt;insert methods&gt;
    private:
          static ofstream&amp; bar;
 }
</code></pre>

<p><strong>Foo.cpp</strong></p>

<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;sstream&gt;
#include "EventReport.h"
using namespace std;

Foo::Foo()
{
   bar.open("foobar.txt");
}
</code></pre>

<p>I keep getting the error message on the "bar" in Foo.cpp (there are multiple in the file).  Any ideas on why? </p>
