I'm trying to add SQLite to my project via a DLL.
I downloaded SQLiteDLL-3 from the download page, extracted its contents (a DLL and a .h file), and ran lib.exe on it to produce a .lib file. I then set the directory containing the .lib and the .dll files to be an Additional Library Directory, in the project settings, under Linker >> General.
Then I downloaded SQLiteSource-3 from the download page, and extracted the SQLite3.h file to the directory with the .Lib and .DLL files, and added that directory as an Additional Include Directory under C/C++ >> General. I added #include to my main file, and then added sqlite3.dll as an Additional Dependency in Linker >> Input.
Basically I followed this, but when I run it, I get an error saying:
fatal error LNK1107: invalid or corrupt file: cannot read at 0x2B8
I tried a number of things to correct it, including building the .lib file under both x86 and x64, and including the full path to the .lib file in the Additional Dependencies list. It's always that error that I get. It seems to at least be finding the .h file okay, because if I mess with the name in the include, I get a "cannot find the file" error, so that part appears to be correct.
Can someone see what I might be doing incorrectly and how to correct the issue?
Update: Fixed the "invalid or corrupt file" issue by adding the .lib file to the Additional Dependies list, as opposed to the .dll file. Now I'm getting unresolved linker errors:
error LNK2019: unresolved external symbol _sqlite3_exec referenced in function _main
error LNK2019: unresolved external symbol _sqlite3_open referenced in function _main
fatal error LNK1120: 2 unresolved externals