title: warning C4251: needs to have dll-interface to be used by clients of class
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4145605/stdvector-needs-to-have-dll-interface-to-be-used-by-clients-of-class-xt-war">std::vector needs to have dll-interface to be used by clients of class &#39;X&lt;T&gt; warning</a>  </p>
  </blockquote>
  
  
  
  <p>This is my first post in this group.</p>
  
  <p>I am creating a DLL and calling it in the main file of the application. The code compiles fine but I get the following error:</p>
  
  <pre><code> warning C4251: 'PNCBaseClass::m_vAvailChannelsFromRx' : class 'std::vector&lt;_Ty&gt;' needs to have dll-interface to be used by clients of class 'PNCBaseClass'
  3&gt;          with
  3&gt;          [
  3&gt;              _Ty=int
  3&gt;          ]
  </code></pre>
  
  <p>My code is as follows:</p>
  
  <pre><code>#define TEST_API __declspec(dllexport)
  class TEST_API PNCBaseClass
  {
  public:
  vector&lt;int&gt; m_vAvailChannelsFromRx
  };
  </code></pre>
  
  <p>I have looked up for solutions and tried and failed.</p>
  
  <p>I do not want to disable the warning.</p>