title: /clang:-1: linker command failed with exit code 1 (use -v to see invocation)
body: <p>I can't seem to figure out why this is happening nothing I do seem to matter and the compiler shows no errors. I just keep getting the same error about the linker command and I can't seem to find anything online that fixes my problem. Im am using xcode 10.</p>
  
  <p>Error</p>
  
  <pre><code>/clang:-1: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>This is my header file with the functions   </p>
  
  <pre><code>#ifndef SINGLELINK_H
  #define SINGLELINK_H
  
  #include&lt;iostream&gt;
  #include&lt;sstream&gt;
  using std::ostream; using std::cout; using std::endl;
  
  template &lt;typename T&gt;
  struct Node{
  public:
      Node *next_;
      T data_;
  
      Node() : data_( T() ), next_(nullptr) {};
      Node(T d) : data_(d), next_(nullptr) {};
  };
  
  template &lt;typename T&gt;
  class SingleLink{
  private:
      Node&lt;T&gt; *head_;
      Node&lt;T&gt; *tail_;
  
  public:
      SingleLink()=default;
      SingleLink(T dat){
          Node&lt;T&gt;* n = new Node&lt;T&gt;(dat);
          head_ = n;
          tail_ = n;
      }
      void append_back(T dat){
          Node&lt;T&gt;* n = new Node&lt;T&gt;(dat);
          if (tail_ != nullptr){
              tail_-&gt;next_ = n;
              tail_ = n;
          }
          else {
              head_=n;
              tail_=n;
          }
      }
      friend ostream&amp; operator&lt;&lt;(ostream &amp;out, SingleLink&lt;T&gt;&amp; s){
          std::ostringstream oss;
          Node&lt;T&gt; *ptr;
          for(ptr = s.head_; ptr != nullptr; ptr = ptr-&gt;next_)
              oss &lt;&lt; ptr &lt;&lt; ",";
          std::string str = oss.str();
          out &lt;&lt; str.substr(0,str.size()-1);
          return out;
      };
      //bool del(T val);
     // Node&lt;T&gt;&amp; SingleLink&lt;T&gt;::operator[](size_t index);
  
      // Rule of three stuff, if you get time. Look at 21.2
      ~SingleLink();
      SingleLink(const SingleLink &amp;);
      SingleLink&amp; operator=(SingleLink);
  
  };
  
  // YOUR STUFF HERE
  
  
  
  
  
  #endif
  </code></pre>
  
  <p>And my main file</p>
  
  <pre><code>#include&lt;iostream&gt;
  using std::cout; using std::endl; using std::ostream;
  #include&lt;string&gt;
  using std::string;
  
  #include "lab13_singlelink.h"
  
  int main () {
      SingleLink&lt;string&gt; sl;
      sl.append_back("beds");
      //sl.append_front("tables");
     // sl.append_back("chairs");
      cout &lt;&lt; sl &lt;&lt; endl;
      //Node&lt;string&gt; *n = sl.find("tables");
      /*if (n != nullptr){
          sl.insert_after("rugs", n);
          cout &lt;&lt; sl &lt;&lt; endl &lt;&lt; endl;
      }*/
  
      /*SingleLink&lt;string&gt; s2(sl);
      s2.append_back("lamps");
      s2.append_front("sofas");
      cout &lt;&lt; sl &lt;&lt; endl &lt;&lt; endl;
      cout &lt;&lt; s2 &lt;&lt; endl &lt;&lt; endl;
      sl = s2;
      sl.append_back("cabinets");
      cout &lt;&lt; sl &lt;&lt; endl &lt;&lt; endl;
      cout &lt;&lt; s2 &lt;&lt; endl &lt;&lt; endl;*/
  
  }
  </code></pre>