title: wxwidgets app in Visual Studio gives error "LNK2019 unresolved external symbol"
body: <p>Im creating my first program with C++ and wxwidgets. 
  When I try to compile the project I get errors. </p>
  
  <pre><code>LNK2019 unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
  
  LNK1120 1 unresolved externals
  </code></pre>
  
  <p>I have compiled the wxwidgets my self in Visual Studio.</p>
  
  <p>After compiling I created a new C++ empty project in Visual Studio.</p>
  
  <p>I went to configuration and added includes directories:</p>
  
  <p><strong>Configuration properties -> C/C++ -> General -> Additional include directories:</strong> </p>
  
  <p>C:\Users\user\source\repos\wxWidgets\include; C:\Users\user\source\repos\wxWidgets\include\msvc</p>
  
  <p><strong>Configuration properties -> Linker -> Additional Library Directories:</strong> </p>
  
  <p>C:\Users\user\source\repos\wxWidgets\lib\vc_lib</p>
  
  <p>Then I added 2 classes, cApp and cMain.</p>
  
  <p><strong>cApp.h</strong></p>
  
  <pre><code>#pragma once
  
  #include "wx/wx.h"
  #include "cMain.h"
  
  class cApp : public wxApp
  {
  public:
      cApp();
      ~cApp();
  
  private: 
      cMain* m_frame1 = nullptr;
  
  public: 
      virtual bool OnInit();
  };
  </code></pre>
  
  <p><strong>cApp.cpp</strong></p>
  
  <pre><code>#include "cApp.h"
  
  wxIMPLEMENT_APP(cApp);
  
  cApp::cApp() {
  
  }
  
  cApp::~cApp() {
  
  }
  
  bool cApp::OnInit() {
      m_frame1 = new cMain();
      m_frame1-&gt;Show();
  
      return true;
  }
  </code></pre>
  
  <p><strong>cMain.h</strong></p>
  
  <pre><code>#pragma once
  
  #include "wx/wx.h"
  
  class cMain : public wxFrame
  {
  public:
      cMain();
      ~cMain();
  };
  </code></pre>
  
  <p><strong>cMain.cpp</strong></p>
  
  <pre><code>#include "cMain.h"
  
  cMain::cMain() : wxFrame(nullptr, wxID_ANY, "MyProgram") {
  
  }
  
  cMain::~cMain() {
  
  }
  </code></pre>