On Wednesday, 27 March, 2019 07:18, Lloyd <lloydkl.t...@gmail.com> wrote:
>I wish to build SQLite as a dll in Windows. As per the documentation >here >https://www.sqlite.org/howtocompile.html, I have executed the command >cl sqlite3.c -link -dll -out:sqlite3.dll >on Visual Studio x86 command prompt. >It seems that the dll built doesn't export any symbols! I checked it >using the dumpbin utility. But the dll downloaded from www.sqlite.org >exports symbols. >How can I build the dll correctly? cl -DSQLITE_API=__declspec(dllexport) sqlite3.c -link -dll -out:sqlite3.dll which will define the SQLITE_API as being dllexport entries so that MSVC will export them. Or you can input a .def file to the linker with the name of the symbols to export. Unlike "-shared" on *nix, the linker does not export entrypoints unless told to do so. The above command should yield the .dll and the .lib import library. If you also get a .manifest then you need to attach it to the .dll using the mt command thusly: mt -nologo -manifest SQLite3.dll.manifest -outputresource:SQLite3.dll;2 --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users