title: Warning C4091: ' __declspec(dllexport)'
body: <p>I have the following code where I am trying to export a function called "Interface_API" out of my dll.</p>
  
  <pre><code>#ifdef INTERFACEDLL_EXPORTS
  #define UserApp_API __declspec(dllexport);
  #else
  #define UserApp_API __declspec(dllimport);
  #endif
  
  UserApp_API int Interface_API(int *, int *, int *);
  </code></pre>
  
  <p>When I compile this code it gives the following warning and the function is not getting exported. </p>
  
  <pre><code>warning C4091: ' __declspec(dllexport)' : ignored on left of 'int' when no variable is declared
  </code></pre>
  
  <p>When I change the declaration as given below I don't get the warning and it exports properly. </p>
  
  <pre><code>__declspec(dllexport) int Interface_API(int *, int *, int *);
  </code></pre>
  
  <p>I am little confused because I have used it in different dll and it works fine. Any clue?</p>