Template build error: Undefined symbols for architecture x86_64:
<p>I am trying to use a template class and when I compile it in one file in LWS it works:
<a href="http://liveworkspace.org/code/a9c412a7e683439dfa35a9363749369d" rel="nofollow">http://liveworkspace.org/code/a9c412a7e683439dfa35a9363749369d</a></p>

<p>But when I try to compile it made-up of 3 files, </p>

<p>stack.h lines 4 to 21</p>

<p>stack.cpp lines 24 to 48</p>

<p>main.cpp lines 49 to end</p>

<p>When I try to compile those 3 files I get </p>

<pre><code>Undefined symbols for architecture x86_64:
  "Stack2&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;::push(Node**, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;)", referenced from:
      _main in ccCoizCT.o
  "Stack2&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;::top(Node*&amp;)", referenced from:
      _main in ccCoizCT.o
  "Stack2&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;::pop(Node*&amp;)", referenced from:
      _main in ccCoizCT.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
</code></pre>

<p>Yes I have included stack.h in a stack.cpp and main.cpp files</p>
