title: Unresolved externals in C++ when using vectors and find
body: <p>I have tried this code in a totally separate project, and it works fine (the only difference being that the project that is not working is being exported as a DLL). Here is the code:</p>
  
  <p><strong>RTATMATHLIB.CPP</strong></p>
  
  <pre><code>#include "stdafx.h"
  #include "RTATMATHLIB.h"
  #include &lt;math.h&gt;
  #include &lt;vector&gt;
  #include &lt;algorithm&gt;
  #include &lt;stdexcept&gt;
  
  using namespace std;
  
  double someFunc(double** Y, int length)
  {
      vector&lt;double&gt; myVector;
  
      for(int i = 0; i &lt; length; i++)
      {
          double value = (*Y)[i];
  
          vector&lt;double&gt;::iterator it = find(myVector.begin(), myVector.end(), value);
  
          if(it != myVector.end())
          {
              continue;
          }
          else
          {
              myVector.push_back(value);
          }
      }
      return 0;
  }
  </code></pre>
  
  <p><strong>RTATMATHLIB.H</strong></p>
  
  <pre><code>__declspec(dllexport) double someFunc(double** Y, int length);
  </code></pre>
  
  <p><strong>ERRORS</strong></p>
  
  <pre><code>Error   1   error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: __thiscall std::_Vector_const_iterator&lt;double,class std::allocator&lt;double&gt; &gt;::_Vector_const_iterator&lt;double,class std::allocator&lt;double&gt; &gt;(double *,class std::_Container_base_secure const *)" (??0?$_Vector_const_iterator@NV?$allocator@N@std@@@std@@QAE@PANPBV_Container_base_secure@1@@Z)  RTATMATHLIB.obj RTATMATHLIB
  Error   2   fatal error LNK1120: 1 unresolved externals
  </code></pre>
  
  <p>And that's it. I am not sure why it works in the other project and not this one...</p>