SQLite Forum

Compiling FILEIO.C
Login
You need to first run one of the batch files installed along with Visual Studio in recent years, shortcuts to which are labeled something like "Open Visual Studio 20xx Tools Command Prompt for targeting ..." and appear in the "Start" menu under "Visual Studio 20xx". These shortcuts run something like "...\VC\Auxiliary\Build\vcvars??.bat" in a cmd.exe session. This leaves a number of environment variable set, such as INCLUDE, LIB, LIBPATH and PATH which makes the Microsoft Visual C/C++ command line tools (CL.exe, LINK.exe, LIB.exe, NMAKE.exe) conveniently usable. (SQLite project makefiles for that toolset are designed with this setup presumed.)

You will need to have "sqlite3ext.h" reachable by the compiler, either in the current directory or findable among the paths named by the INCLUDE environment variable. This header is included with the amalgamation.

The environment variable setup done per above will also cause various link libraries to be findable by the compiler/linker that is run as CL.exe ; these should permit the link phase, which happens when the simple, one-line build procedure is used, to succeed.

The above-described arrangement, where "CL" just works (usually), is not unique to SQLite. A great many software builds can be effected the same way, by naming the files to be compiled and linked to the CL.exe driver.