Could be your program cannot find the SQLite DLL. You're compiling for i386-Win32, so your SQLite DLL should be 32bit. Copy the DLL to the same directory as test.exe.
Although that works, it is not the proper way to do things, because you need a copy of the dll's for every new application. This leads to disk rot.
The recommended way is like this, read carefully because it can be confusing:
1. On a
32bit WIN32 OS put a
32 bit Sqlite3.dll in \windows\
system32 and you can pick and mix.
2. On a 64bit WIN64 OS, but your code compiled for 32 bit, the 32 bit dll should go in \windows\sysWOW64. WOW64 represents Windows32 on Windows 64.
3. On a
64bit WIN64 OS, with your code compiled for 64 bit, a 64bit dll should go in
\windows\system32 and that is not a typo.
Point 3 makes things a bit confusing, but yes, on WIN64 64 bit dll's go in the \windows\system32 directory and 32 bit dll s go in sysWOW64
If you do that properly you won't have any issues with either 32 bit or 64 bit applications. If both are installed properly you can pick and mix between 32 and 64.
(Do this for all commonly used dll's, e.g., not only sqlite, but also opensll etc. )