SQLite Forum

Looks like some exports are missing from the Windows x64 official SQLite DLL

Looks like some exports are missing from the Windows x64 official SQLite DLL

(1) By anonymous on 2022-01-21 17:28:26 [link] [source]

Just updating my code to work with the latest v3.27.2 version of SQlite and upon testing my x64 Windows binaries, I am getting the error the procedure entry point sqlite3_value_frombind could not be located in the dynamical link library... Upon checking with dependency walker it does indeed look like this function is not exported from the x64 prebuilt version of SQlite3. The x86 version of SQLite does have this function. Both the x86 and x64 def files for SQlite3 for Windows reference this function but the x64 dll does not have it. There may well be other missing functions as I did not do a comprehensive check of the exports between x86 and x64 SQLite.

Regards, PJ Naughter

(2) By RandomCoder on 2022-01-21 17:58:26 in reply to 1 [source]

It really looks like it's present, what am I missing?

C:\Temp> wget https://www.sqlite.org/2022/sqlite-dll-win64-x64-3370200.zip
2022-01-21 09:48:16 (2.48 MB/s) - 'sqlite-dll-win64-x64-3370200.zip' saved [911410/911410]
C:\Temp> 7z x sqlite-dll-win64-x64-3370200.zip
Extracting archive: sqlite-dll-win64-x64-3370200.zip
C:\Temp> ren sqlite3.dll sqlite3_2022-01-21_test.dll
C:\Temp> dumpbin /exports sqlite3_2022-01-21_test.dll | grep sqlite3_value_frombind
        249   F8 00001267 sqlite3_value_frombind

C:\Temp> type main.c
#include <windows.h>
#include <stdio.h>
int main() {
    HMODULE sqldll = LoadLibraryA("sqlite3_2022-01-21_test.dll");
    FARPROC func = GetProcAddress(sqldll, "sqlite3_value_frombind");
    printf("sqldll = %llx, sqlite3_value_frombind = %llx", (unsigned long long)sqldll, (unsigned long long)func);
C:\Temp> cl main.c
C:\Temp> main.exe
sqldll = 180000000, sqlite3_value_frombind = 180001267

(3) By Larry Brasfield (larrybr) on 2022-01-21 19:11:19 in reply to 1 [link] [source]

Adding to R.Coder's reply:

Using MSVC's dumpbin tool after doing the same wget and unzipping: [C:\Tmp] > dumpbin /exports sqlite3.dll | grep frombind 249 F8 00001267 sqlite3_value_frombind

I dread running the dependency walker anymore because it takes forever to figure out modern, delay-linked DLLs, but eventually, after sucking CPU for 5 minutes and revving the fan at full tilta, it also finds that export.

At this point, I wonder what dependency walker you are using. Also, what makes you use the plural "exports are missing" when your post says "There may well be other missing ...". I get precisely as many exports from dumpbin as are present in the accompanying sqlite3.def (using grep and wc), so even the singular would be an overstatement.

a. The walker has to hit a recursion limit numerous times on kernel32.dll, which it dutifully (and painfully slowly) displays after working so hard to descend into a loop in the dependency graph.

(4) By anonymous on 2022-01-21 22:13:31 in reply to 3 [link] [source]

Folks, the original poster here: I redownloaded the x64 and x86 prebuilt Sqlite3 DLLs and regenerated the import files using lib /def:sqlite3.def /out:sqlite3.lib /machine:x64 and reran my test app and the problem has gone away. Not sure what the source of the original problem I had but the problem now does not exist. I also confirmed the presence of the functions using both dumpbin /exports and the old Dependency Walker application (which does take forever now<g>), so everything is good. Sorry for the false report.

Regards, PJ Naughter