title: Linking not successful upon compiling a dummy C++ program
body: <p>I have this file: <code>myfuncts.hpp</code>:</p>
  
  <pre><code>#ifndef FUNCTS_
  #define FUNCTS_
  namespace root {
  namespace functs {
  template &lt;typename T&gt;
  class f1 {
  public:
    T r;
    f1();
  };
  }
  }
  #endif
  </code></pre>
  
  <p>I have the implementation: <code>myfuncts.cpp</code>:</p>
  
  <pre><code>#include "myfuncts.hpp"
  template &lt;typename T&gt;
  root::functs::f1&lt;T&gt;::f1() { /* do somethng */ }
  </code></pre>
  
  <p>Then I have my main routine:</p>
  
  <pre><code>#include "impulses.hpp"
  int main(int argc, char** argv);
  int main(it argc, char** argv) {
    root::functs::f1&lt;double&gt; f();
  }
  </code></pre>
  
  <p>I compile it:</p>
  
  <pre><code>g++ main.cpp functs.cpp
  </code></pre>
  
  <p>And got this:</p>
  
  <blockquote>
    <p>/tmp/ccrdJEQt.o: In function <code>main': main.cpp:(.text+0x53): undefined
    reference to</code>root::functs::f1::f1()' collect2: ld returned 1
    exit status</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>