title: wxWidgets setup in Microsoft Visual Studio 2017
body: <p>I've been trying to figure out for about 20 hours how to setup wxWidgets in Microsoft visual studio 2017. I've followed:</p>
  
  <p><a href="https://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide" rel="noreferrer">https://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide</a></p>
  
  <p><a href="https://raw.githubusercontent.com/wxWidgets/wxWidgets/WX_3_0_BRANCH/docs/msw/install.txt" rel="noreferrer">https://raw.githubusercontent.com/wxWidgets/wxWidgets/WX_3_0_BRANCH/docs/msw/install.txt</a></p>
  
  <p>and other numerous websites on how to set it up. I've even followed some of the posts in this website like and youtube:</p>
  
  <p><a href="https://stackoverflow.com/questions/37995066/how-to-set-up-wxwidgets-3-1-0-with-visual-studio-2015">How to set up wxWidgets 3.1.0 with Visual Studio 2015</a></p>
  
  <p>I am literally stuck:
  I compiled it from source. And I believe I had no problem with it. I compiled it statically (DEBUG/RELEASE)...</p>
  
  <p>Everytime I follow the tutorials and posts I get very weird messages...</p>
  
  <p>Would there be anyone with a kind heart bother to spend some of his time to show me how to setup wxWidgets for Microsoft visual studio 2017 (Project Setup or something) fully?</p>
  
  <p>Every answer would be appreciated :|</p>
  
  <p>Sorry for not providing you guys with enough information.</p>
  
  <p><a href="https://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide" rel="noreferrer">https://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide</a></p>
  
  <p>Been following the above link... The "Creating a new project by hand" didn't work</p>
  
  <p>With the "Creating a new project from a sample":</p>
  
  <p>Used the minimal sample instead of the internat because it had a solution file (internat didn't)...</p>
  
  <p>I modified the .sln and .vcxproj file (replaced ../.. .... with the wxWidgets directory) and when tried to compile some simple code got plenty of errors like: "cannot open source file "wx.wx.h". So I went to project properties/ vc++ directories and specified the include and lib locations </p>
  
  <p>Include Directories:
  C:\wxWidgets-3.1.0/include
  C:\wxWidgets-3.1.0/include/msvc</p>
  
  <p>Libraries Directories
  C:\wxWidgets-3.1.0/lib/vc_lib</p>
  
  <p>And then I got <strong>LOTS</strong> of errors like "could not open C:\wxWidgets-3.1.0\samples.RC</p>
  
  <p>So I opened the project file as notepad and added the source.rc location:</p>
  
  <p>ItemGroup
      ResourceCompile Include="C:\wxWidgets-3.1.0\samples\sample.rc" /
  and the source.rc disappeared, but the so 50 errors were still there:</p>
  
  <p>(e.g. Error    C2491   'wxBitmapButton::ms_classInfo': definition of dllimport static data member not allowed core  C:\wxWidgets-3.1.0\src\common\bmpbtncmn.cpp 71)</p>
  
  <p>Is there any easy way of setting up wxWidgets? </p>
  
  <p><a href="https://stackoverflow.com/questions/37995066/how-to-set-up-wxwidgets-3-1-0-with-visual-studio-2015">How to set up wxWidgets 3.1.0 with Visual Studio 2015</a></p>
  
  <p>In the above link the bottom of the first answer "The next step is to copy the samples\minimal folder somewhere and start writing the code. All you will need to do is to change the Include and Lib search path."</p>
  
  <p>I didn't really understand what he meant. I really need further clarification. It may solve all the horrible errors I have encountered. </p>
  
  <p>This "question" may be super messy but I have no choice other than ask more experienced programmers for help... </p>
  
  <p>Don't give up on me this quickly :3</p>