Forwarded for documentation purposes in case someone else has the same question ...
-- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. -----Original Message----- From: Keith Medcalf Sent: Wednesday, 28 August, 2019 11:57 To: Reynolds, Scott Subject: RE: [sqlite] Problem building DLL on Windows - no exported symbols Hmmm. I just downloaded the sqlite-autoconfig-3290000.tar.gz and took a look. You are correct, it is quite different from the makefile.msc contained in the canonical distribution (I use the fossil sources). So it appears that "replace.exe" is used which is built from "replace.cs" to run the regular expression to build the sqlite3.def, and the dumpbin.exe only contains the symbols if the symbols have been exported, which appears to only occur if FOR_WIN10 is set. You can force this by setting making the preprocessor symbol SQLITE_API resolve to __declspec(dllexport) which causes the API to be exported. Setting FOR_WIN10 creates a bunch of other problems for me because is also appears to then want some whole Microsoft crapbag instead of just being a normal compile and link. OPTS="..." allows you to send arbitrary things to the compiler command line without affecting the rest of the process. In this case, you are telling the compiler to export the SQLITE_API symbols in which case the sqlite3.def is generated correctly (more or less -- it works -- though I get complaints from the linker about duplicates being ignored) Try using the following: nmake -f Makefile.msc OPTS="-DSQLITE_API=__declspec(dllexport)" PLATFORM=x64 dll -- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: Reynolds, Scott >Subject: Re: [sqlite] Problem building DLL on Windows - no exported symbols >Sorry to send this direct, but I'm not getting messages from the >list. > > > >That snippet from Makefile.msc is very different from the one I have. > > > >sqlite3.def: Replace.exe $(LIBOBJ) > > echo EXPORTS > sqlite3.def > > dumpbin /all $(LIBOBJ) \ > > | .\Replace.exe >"^\s+/EXPORT:_?(sqlite3(?:session|changeset|changegroup|rebaser)?_[^@ >,]*)(?:@\d+|,DATA)?$$" $$1 true \ > > | sort >> sqlite3.def > >But to your point, I confirmed the presence of the required tools. >It seems as though the problem is with the regular expression and >replacement. I'm no regex expert, but the string "/EXPORT:_", >excluding quotes, does not appear in the output from dumpbin. This >produces a sqlite3.def file that contains only the "EXPORTS" line >that was echoed into the file. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users