title: How to setup wxWidgets in VSCode for GCC?
body: <p>I'm trying to make a GUI-Project with wxWidgets. Instead of using Visual Studio I want to use VSCode with the GCC (MinGW).<br>
  I'm facing the following problem: <strong>I can't compile or run any code which has wxWidgets librarys included. How have the c_cpp_properties.json and the tasks.json files to be configured?</strong></p>
  
  <p>I already went through the instructions for installing wxWidgets using "Cygwin/MinGW Compilation" part "Using plain makefiles:". (<a href="https://docs.wxwidgets.org/3.1.2/plat_msw_install.html" rel="nofollow noreferrer">https://docs.wxwidgets.org/3.1.2/plat_msw_install.html</a>)<br>
  1. cd .../wxWidgets-3.1.2\build\msw<br>
  2. mingw32-make -f makefile.gcc (for generating Build=debug per default)</p>
  
  <p>And added following to my files:<br>
  <em>tasks.json:</em></p>
  
  <pre><code>    "version": "2.0.0",
      "tasks": [
          {
              "label": "echo",
              "type": "shell",
              "command": "g++",
              "args": [
                  "-g", "cApp.cpp", 
                  "-I", "D:/Programme/wxWidgets-3.1.2/include/msvc", 
                  "-I", "D:/Programme/wxWidgets-3.1.2/include", 
                  "-L", "${WXWIN}/lib/vc_lib"
              ],
              "group": {
                  "kind": "build",
                  "isDefault": true
              }
          }
      ]
  }
  </code></pre>
  
  <p><em>c_cpp_properties.json:</em></p>
  
  <pre><code>    "configurations": [
          {
              "name": "Win32",
              "includePath": [
                  "${workspaceFolder}/**",
                  "${WXWIN}/include/msvc",
                  "${WXWIN}/include"
              ],
              "browse": { "limitSymbolsToIncludedHeaders": true,
                  "path": [
                      "${WXWIN}/include/msvc",
                      "${WXWIN}/include"
                  ]
              },
              "defines": [
                  "_DEBUG",
                  "UNICODE",
                  "_UNICODE",
                  "__WXMSW__",
                  "NDEBUG",
                  "WXUSINGDLL"
              ],
              "compilerPath": "E:/Programme/MinGW/bin/g++.exe",
              "compilerArgs": [
                  "-g",
                  "${file}",
                  "-o",
                  "${fileDirname}/${fileBasenameNoExtension}.exe",
                  "-I", "${WXWIN}/include/msvc",
                  "-I", "${WXWIN}/include",
                  "-L", "${WXWIN}/gcc_lib",
                  "-L", "${WXWIN}/gcc_lib/mswud"
              ]
          }
      ],
      "version": 4
  } 
  </code></pre>
  
  <p>I got the following error from my own code while compiling, which uses <code>#include "wx/wx.h"</code>:</p>
  
  <pre><code>                 from ${WXWIN}/include/wx/defs.h:45,
                   from ${WXWIN}/include/wx/wx.h:14,
                   from ${Project}\VSC-Basic-ProjectSetup\src\cMain.h:1,
                   from ${Project}\VSC-Basic-ProjectSetup\src\cMain.cpp:1:
  ${WXWIN}/include/msvc/wx/setup.h:12:6: error: #error "This file should only be included when 
       #error "This file should only be included when using Microsoft Visual C++"
        ^~~~~
  ...
  ...
  ...
  In file included from ${WXWIN}/include/wx/platform.h:148:0,
                   from ${WXWIN}/include/wx/defs.h:45,
                   from ${WXWIN}/include/wx/wx.h:14,
                   from ${Project}\VSC-Basic-ProjectSetup\src\cMain.h:1,
                   from ${Project}\VSC-Basic-ProjectSetup\src\cMain.cpp:1:
  ${WXWIN}/include/msvc/wx/setup.h:125:27: fatal error: ../../../lib/vc_lib /msw /wx/setup.h: N
   #include wxSETUPH_PATH_STR
                             ^
  compilation terminated.
  The terminal process terminated with exit code: 1
  </code></pre>
  
  <p>${WXWIN}, ${Project} are just placeholders.</p>