title: Why I receive error LNK1561 "Entry point must be defined" when I compile a DLL Project?
body: <p>I try to compile a very simple dynamic library project as .dll file.
  The name of the project is "Library".
  I'm using Visual Studio 2015 and the project properties are these:</p>
  
  <p><a href="http://i.stack.imgur.com/nTcsy.png" rel="noreferrer">Debug Properties</a></p>
  
  <p><a href="http://i.stack.imgur.com/Joy0A.png" rel="noreferrer">Release Properties</a></p>
  
  <p>In the project there are two files only: ClassA.h and ClassA.cpp.</p>
  
  <p>The code in ClassA.h is:</p>
  
  <pre><code>#ifndef CLASSA_H
  #define CLASSA_H
  
  using namespace std;
  
  #ifdef LIBRARY_EXPORTS
  #define CLASSA_API __declspec(dllexport) 
  #else
  #define CLASSA_API __declspec(dllimport) 
  #endif
  
  class ClassA
  {
  public:
      static CLASSA_API void func();
  };
  
  
  #endif
  </code></pre>
  
  <p>The code in ClassA.cpp is:</p>
  
  <pre><code>#include "ClassA.h"
  #include &lt;iostream&gt;
  
  
  void ClassA::func()
  {
      cout &lt;&lt; "SUCCESS!" &lt;&lt; endl;
  }
  </code></pre>
  
  <p>When I try to compile this project I receive this error:</p>
  
  <blockquote>
    <p>Severity  Code    Description Project File    Line Error  LNK1561 entry point
    must be defined   Library C:\Users\UX303\Documents\Visual Studio
    2015\DLLTest\Library\LINK 1</p>
  </blockquote>