I'm trying to use the 64-bit DLL for SQLite, with no success. I can use the 32-bit version successfully using the same configuration. Why is there a difference?
I have created an x64 project in Visual Studio 2008/VC++.
I've downloaded the x64 sqlite binaries from here.
I've taken the sqlite3.h from the amalgamation source code at the same site and added to my Header Files in the project.
In my VS project, I've added the sqlite directory to Linker->General->Additional Library Directories. I put sqlite3.lib in Linker->Input->Additional Dependencies.
I wrote some very basic sqlite code to ensure this all worked:
#include "stdafx.h"
#include "sqlite3.h"
int _tmain(int argc, _TCHAR* argv[])
{
sqlite3 *dbfile;
sqlite3_close(dbfile);
return 0;
}
When I compile, the linker complains:
error LNK2001: unresolved external symbol sqlite3_close
I've also set the linker output to /verbose to see this:
Searching C:\sqlite-dll-win64-x64-3130000\sqlite3.lib:
What am I missing here? Something obvious? HELP!
p.s. As a sanity check, I've done all the above steps for a Win32 VS application with the x86 binaries, and I have no Linker errors in that case. And I see this:
1> Searching C:\sqlite-dll-win32-x86-3130000\sqlite3.lib:
1> Found _sqlite3_close
1> Referenced in MyProject.obj
1> Loaded sqlite3.lib(sqlite3.dll)