I'm trying to build an app which uses sqlite3 for storing and fetching data, Till now I've used meson to generate my project and I'm now in a stage where I need VS 2022 for debugging purpose, while converting to VS, I'm stuck in producing a correct sqlite3 DLL, because when I use GCC to compile sqlite3.c (source file)
gcc -shared sqlite3.c -o sqlite3.dll
and use gendef or dumpbin to produce exports then a dummy .lib file to be linked inside VS project, It all works fine, But when I use VS 2022 to compile it as a DLL, both gendef and dumpbin fails
dumpbin /exports sql.dll
Microsoft (R) COFF/PE Dumper Version 14.33.31630.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file sql.dll
File Type: DLL
Summary
3000 .data
E000 .rdata
5000 .reloc
1000 .rsrc
AC000 .text
and
gendef - sql.dll
* [sql.dll] Found PE image
I know sqlite3 offers a DLL (which is working fine), but why this problem exists or am I doing something wrong, PS I've also used build command from sqlite documentation, still the same error
cl sqlite3.c -link -dll -out:sqlite3.dll
even the above command didnt produce correct .def file