Question: Am trying to build [wxsqlite3](https://github.com/utelle/wxsqlite3) using visual studio 2019 which off course uses platform tool set vc142. My wxWidgets version is 3.1.2 and I already built it using vc142 successfully.

unfortunately I keep getting the error 

> 
> D:\cpp\wxWidgets-3.1.2\include\msvc\wx\setup.h(125,10): error C1083:
>  Cannot open include file:
>  '../../../lib/vc141\_x64\_dll/mswud/wx/setup.h': No such file or
>  directory
> 
> 
> 

How do I build this wxsqlite3 with v142 so that I can stop getting this kind of an error?

Answer: 
At the time wxWidgets 3.1.2 was released, wxWidgets had not yet support for the automatic library/DLL loading mechanism of VS2019 and erroneously referenced the VS2017 include path. This has been fixed in the wxWidgets git repository. In file include/msvc/wx/setup.h line 68 was modified and lines 70 and 71 were added. You would have to adjust your wxWidgets installation accordingly.

However, since wxWidgets does not provide prebuilt binaries for VS2019, I assume you built the wxWidgets library yourself. And probably you did not make use of the compiler specific prefix. That is, in your installation the library path ../../../lib/vc142\_x64\_dll most likely doesn't exist at all; instead you have the wxWidgets link libraries in ../../../lib/vc\_x64\_dll.

If this is the case, you have to adjust the properties file wx\_setup.props in folder build of the wxSQLite3 distribution. Look for the properties wxCompilerPrefix and wxMsvcVersionAuto and adjust them as follows:

```
<wxCompilerPrefix>vc</wxCompilerPrefix>

```

and

```
<wxMsvcVersionAuto></wxMsvcVersionAuto>

```

b
I tested the VS2019 build files of the latest wxSQLite3 version and had no issues. That is, in principle the wxSQLite3 build files should work right out of the box. However, modifications to wx\_setup.props may be necessary to match your installation.
Thereafter the VS2019 build should work for you.

But next time it may be good if you ask the question in one place which is on [wxSqlite3's Issue tracker](https://github.com/utelle/wxsqlite3/issues).
This is a hack, but as MSVS 2017 and 2019 are ABI-compatible (which is why they use toolset versions 141 and 142, and not 15 and 16), you can get away with just creating a link from `vc141_x64_dll` to `vc142_x64_dll` using e.g. `junction` tool.

Of course, rebuilding everything using the same compiler and options is better and safer, but if you can't do this, for whatever reason, the above would work too.