SQLite Forum

Compiling amalgamation with Visual Studio 2019
Login
C/C++ is virtually alien to me; I use C#.

>How are you trying to compile? 

I have Visual Studio 2019 Enterprise. I extracted the file from the download and copied the following file into a new directory:

```
shell.c 
sqlite3.c
sqlite3.h
sqlite3ext.h
```
From the VS2019 IDE 

- I select File | New | Project from Existing Code and select my directory where the above files are.
- I select Build | Batch Build and click Rebuild.

That takes to the errors I reported in my original post.

As far as I am aware, I have made no configuration changes in VS2019.

> having run VsDevCmd.bat

I believe that is the Visual Studio Command Prompt. I found several versions of CL.EXE. Using this version:

>"D:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.16.27023\bin\\Hostx86\\x86\\cl.exe"

(I can't find the command prompt for VS2019, only the one for VS2017.)

I tried your suggestion, namely,

> cl shell.c sqlite3.c

This gives me the following:


>E:\\Ajay\\C#\\VS2019\\SQLite3\shell.c(85): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
sqlite3.c

>D:\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.16.27023\\include\\xmmintrin.h(79): fatal error C1083: Cannot open include file: 'malloc.h': No such file or directory
```

If you look carefully, this is exactly the errors that the VS2019 gave me - [see above](https://sqlite.org/forum/forumpost/b188b0ec2a?t=h).

So I am no further forward. CL.EXE would not be looking at the VS2019 configurations.

What I find strange is that using the same approach, I was able to compile the source code for v3.33 with VS2019 - which, now, no longer compiles.

I am still missing something!