title: C++: Warning inconsistent dll linkage
body: <p>I have an issue with Visual studio (in C++)</p>
  
  <p>I got a warning and I don't know why because I never call 2 time the same variable.</p>
  
  <p><code>function: inconsistent dll linkage</code></p>
  
  <p>warning list: (in french)
  <a href="https://i.stack.imgur.com/hapsE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hapsE.png" alt="warning list - visual studio c++"></a></p>
  
  <p>I read on microsoft: <a href="https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&amp;l=EN-US&amp;k=k%28C4273%29&amp;rd=true" rel="noreferrer">Compiler Warning (level 1) C4273</a> but I don't really know if it's my problem because the example is not like mine.</p>
  
  <p>I read also <a href="https://stackoverflow.com/questions/2592523/about-inconsistent-dll-linkage">About inconsistent dll linkage (StackOverflow</a> and it tell me that because I use MFC in dll but I didn't check the header MFC.
  <a href="https://i.stack.imgur.com/HpGMp.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HpGMp.png" alt="not MFC header"></a></p>
  
  <p>it's my "PayRespectdll.h"</p>
  
  <pre><code>#pragma once
  
  #ifdef PAYRESPECTDLL_EXPORTS
  #define PAYRESPECTDLL_API __declspec(dllexport) 
  #else
  #define PAYRESPECTDLL_API __declspec(dllimport) 
  #endif
  
  #include &lt;ctime&gt;
  #include &lt;time.h&gt;
  #include &lt;string&gt;
  
  namespace PayRespectDLL
  {
      class PayRespect
      {
      private:
          static struct std::tm when;
      public:
          static PAYRESPECTDLL_API bool is_setup();
          static PAYRESPECTDLL_API void setup(std::string date);
          static PAYRESPECTDLL_API bool is_possible();
      }
  }
  </code></pre>
  
  <p>PayRespectDLL.cpp:</p>
  
  <pre><code>// PayRespectDLL.cpp :
  //
  
  #include "stdafx.h"
  #include "PayRespectDLL.h"
  #include &lt;stdexcept&gt;
  #include &lt;time.h&gt;
  #include &lt;string&gt;
  #include &lt;stdlib.h&gt;
  
  
  using namespace std;
  
  namespace PayRespectdll
  {
      bool PayRespect::is_setup()
      {
          return false;//already_setup;
      }
  
      // setup attempt String: hh:mm:ss.
      void PayRespect::setup(string date)
      {
          return;
      }
  
      bool PayRespect::is_possible()
      {
          return true;
      }
  }
  </code></pre>
  
  <p>thank you!</p>