title: Macro for dllexport/dllimport switch
body: <pre><code>#if COMPILING_DLL
      #define DLLEXPORT __declspec(dllexport)
  #else
      #define DLLEXPORT __declspec(dllimport)
  #endif
  </code></pre>
  
  <p>How / where do I define <code>COMPILING_DLL</code> ? </p>
  
  <p>Seen here: 
  <a href="https://stackoverflow.com/questions/8863193/what-does-declspecdllimport-really-mean">what does __declspec(dllimport) really mean?</a></p>
  
  <p>Sounds like I can't use load-time dynamic linking at all if I can't use the same header?</p>
  
  <p><img src="https://i.stack.imgur.com/OymqA.png" alt="enter image description here"></p>