title: Unresolved external symbol when using std::wstring
body: <p>I declared the the following class:</p>
  
  <pre><code>#pragma once
  
  #include &lt;stdio.h&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  
  namespace util
  {
  
  class FileReader
  {
  public:
      FileReader();
      ~FileReader();
  
      bool open(const std::wstring&amp; name);
      void close();
      bool read(std::vector&lt;char&gt;&amp; buf, __int64 startFrom, int size);
      __int64 size() const;
  
  private:
      FILE* m_file;
      std::wstring m_name;
      __int64 m_size;
  };
  
  }
  </code></pre>
  
  <p>And its implementation:</p>
  
  <pre><code>#include "FileReader.hpp"
  
  namespace util
  {
  
  bool FileReader::open(const std::wstring&amp; name)
  {
      if (!name.empty() &amp;&amp; (m_name != name))
      {
          close();
          if (_wfopen_s(&amp;m_file, name.c_str(), L"rb") == 0)
          {
              m_name = name;
              // Get the file size
              _fseeki64(m_file, 0, SEEK_END);
              m_size = _ftelli64(m_file);
              rewind(m_file);
          }
          else
          {
              m_file = NULL;
          }
      }
      return (m_file != NULL);
  }
  // ....
  }
  </code></pre>
  
  <p>in a seperate library and use it like this:</p>
  
  <p>FileTransfer.cpp</p>
  
  <pre><code>#include &lt;util/FileReader.hpp&gt;
  
  // .....    
  
  if (!m_fileReader.open(m_localFileName))   //   std::wstring m_localFileName;
  {
      ::MessageBoxA(NULL, "Failed to open file", "Error", MB_ICONERROR);
      stopFileTransmission();
      return;
  }
  </code></pre>
  
  <p>in another project. Both projects compile successfully, but the FileTransfer.obj fails to link:</p>
  
  <blockquote>
    <p>Error 2   error LNK2019: unresolved external symbol "public: bool
    __thiscall util::FileReader::open(class std::basic_string,class
    std::allocator > const &amp;)"
    (?open@FileReader@util@@QAE_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@Z)
    referenced in function
    __catch$?onRequestDirClicked@FileTransferWindow@@AAEXXZ$0 C:\Users\x\Documents\dev\Server\FileTransfer.obj    Server</p>
  </blockquote>
  
  <p>I remember it was working when I used <code>std::string</code>, so I assume it has something todo with <code>std::wstring</code>.</p>
  
  <p>Any idea what could be the issue?</p>