title: Getting linking errors when using header CPP
body: <p>I made a class that helps read .csv files in visual studio 2019 (The class is called CsvReader).</p>
  <pre><code>#pragma once
  
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;unordered_map&gt;
  #include &lt;fstream&gt;
  
  namespace csv
  {
      class CsvReader
      {
      private:
          std::string fileName;
          std::vector&lt;std::vector&lt;std::string&gt;&gt; content;
          std::unordered_map&lt;std::string, int&gt; fieldIndex;
          std::unordered_map&lt;int, std::string&gt; indexField;
  
      public:
          CsvReader(const char* file);
          void loadFile(const char* file);
          std::vector&lt;std::vector&lt;std::string&gt;&gt; items();
          int fieldToIndex(std::string field);
          std::string indexToField(int index);
          size_t fieldCount();
          void print();
          void trim(const char symbol);
      };
  }
  </code></pre>
  <p>I want to use that class in a different solution to read a .csv file. The configuration type of the CsvReader is Dynamic Library (.dll).</p>
  <p><a href="https://i.stack.imgur.com/bFyPP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bFyPP.png" alt="enter image description here" /></a></p>
  <p>When I try to #include &quot;CsvReader.h&quot; in the project that I want to use the CsvReader in, the program recognizes the class, but when I run the program, I get two linking errors.</p>
  <blockquote>
  <p>LNK2019 unresolved external symbol &quot;public:_thiscall csv::CsvReader(char const*)&quot; (??0CsvReader@csv@@QAE@PBD@Z) referenced in function_main</p>
  </blockquote>
  <p>and</p>
  <blockquote>
  <p>LNK2019 unresolved external symbol &quot;public:void_thiscall csv::CsvReader::print(void)&quot; (?print@CsvReader@csv@@QAEXXZ) referenced in function_main</p>
  </blockquote>
  <p>I don't really understand what I am doing wrong.</p>
  <p>The program that I want to use the class in:</p>
  <pre><code>#include &quot;../../Classes/CsvReader/CsvReader/CsvReader.h&quot; // I know it's a pretty long path
  #include &lt;iostream&gt;
  
  int main()
  {
      csv::CsvReader test1 (&quot;TestCases/test.csv&quot;);
      test1.print();
  
      return 0;
  }
  </code></pre>
  <p>The .CPP file in which I define all the functions is pretty big, and I don't know if that one is necessary.</p>