Süleyman Kenar Süleyman Kenar - 16 days ago 8
C Question

Why do I need a DLL to use sqlite3?

I have a program in C. I need to use a SQLite library to read data from a database.

When I include

sqlite3.h
to my source file I get
unresolved symbol
errors on
sqlite3
functions.

If I add
lib
file as library I don't get any error but program requires
sqlite3.dll
to run.

I already tried to play with compiler settings but nothing changed.

SQLite is written in C and my program is also C. Why do I need a DLL file to use SQLite?

How can I remove the DLL dependency.

I'm using MCVS2015 community edition IDE.

CL. CL.
Answer

The recommended way of compiling SQLite is to download the amalgamation source code file (sqlite3.c), and to add it to your project.