Recently I needed to grab the latest version of SQLite3 for use in work projects. Problem is, its pre-built Windows DLL package only comes with two files: sqlite3.dll and sqlite3.def. There is no sqlite3.lib.
Turns out you can generate sqlite3.lib from the .def file. Here are the steps.
1) Launch the Visual Studio Command Prompt. For Visual Studio 2010, you can find it here:
Start menu -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt
2) cd to the directory containing your downloaded and expanded “Precompiled Binaries for Windows” sqlite dll package. You can find these packages on the downloads page for SQLite.
Enter the following command:
lib /def:sqlite3.def /out:sqlite3.lib
Viola, you’re done! You now have a .lib file that matches the .dll.