I'm doing a job that needs linking Sqlite with C++, but I've encountered some troubles doing this.
I've searched many courses already. I've added all the files more than needed sqlite3.dll,sqlite3.def,sqlite3.h.sqlite3.exe,sqlite3.lib
into the project folder but I still failed to do it right.


the result of compiling main.cpp

You just have to 1) add the .h header file to your include path 2) add the .lib library file to your libraries path 3) add a static link to the .lib file in your project properties (both debug and release builds) 4) remove all other references (def, dll, exe) from the project 5) make sure the .dll file is in the same directory as your .exe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With