Hello Bart, dumpbin /all sqlite3.obj > sqlite.txt
You can then look at the sqlite.txt file with a text editor. I found _sqlite3_db_filename listed in there a couple times. That tells you it was probably compiled in. If you can't find it then that could be part of the problem. Then I might dump the obj for the Stdcall file and see how it mentions the function too. I have no idea how long this function has been in Sqlite. It makes me wonder if you're using an older version where the function didn't exist. As an experiment, I'd probably comment out the function in the stdcall wrapper that calls _sqlite3_db_filename then rebuild. See if the error goes away. Sunday, March 1, 2015, 5:15:32 AM, you wrote: BS> Iooked at that underscore (in _sqlite3_db_filename) as well, but that is BS> just how VS presents the error, it didn't find a faulty underscore in the BS> code. So, that is not it. As far as I can see the SQLite3 functions in this BS> project are only in 3 places: sqlite3.h, SQLite3_StdCall.c and in the .def BS> file. sqlite3_db_filename is in all 3 and all seems to be spelled right. BS> Not sure if it gives any more information, but this is the build output: 1>>------ Build started: Project: SQLite3_StdCall, Configuration: Release BS> Win32 ------ 1>> SQLite3_StdCall.c 1>> Creating library BS> C:\Users\Bart\SQLiteForExcel\Source\SQLite3_StdCall\Release\SQLite3_StdCall.lib BS> and object BS> C:\Users\Bart\SQLiteForExcel\Source\SQLite3_StdCall\Release\SQLite3_StdCall.exp 1>>SQLite3_StdCall.obj : error LNK2001: unresolved external symbol BS> _sqlite3_db_filename 1>>C:\Users\Bart\SQLiteForExcel\Source\SQLite3_StdCall\Release\SQLite3_StdCall.dll BS> : fatal error LNK1120: 1 unresolved externals BS> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== BS> RBS BS> On Sun, Mar 1, 2015 at 7:10 AM, Amit Chaudhuri <amit.k.chaudhuri at gmail.com> BS> wrote: >> Bart, >> >> you say "don't know anything about C or C++ or compiling C code" >> Perhaps this will help. >> >> The error message (unresolved) external means that the linker is >> trying to find something (_sqlite3_db_filename in this case) but it >> cannot. >> >> Possible common causes include - it has been misspelt (I'm looking at >> that underscore) or you have failed to point it at a library. >> >> I'm afraid I'm not fluent in the windows tools to track this down and >> don't have a system I can follow along with. But on Linux one might >> use the nm utility to examine a contents of library files for symbols. >> >> Regards, >> >> Amit >> >> On Sat, Feb 28, 2015 at 11:22 AM, Bart Smissaert >> <bart.smissaert at gmail.com> wrote: >> > Trying to compile a std_call dll to be used with VB6 and VBA. >> > Using instructions and files from this website: >> > https://sqliteforexcel.codeplex.com/ >> > All works well and have added a few SQLite functions that weren't in the >> > compiled dll >> > as in the download section from that website. >> > However having problems adding sqlite3_db_filename. >> > >> > I added this to sqlite3.h: >> > >> > const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName); >> > >> > and this to SQLite3_StdCall.c: >> > >> > SQLITE3_STDCALL_API const char * __stdcall >> > sqlite3_stdcall_db_filename(sqlite3 *pDb, const char *zDbName) >> > { >> > return sqlite3_db_filename(pDb, zDbName); >> > } >> > >> > It doesn't compile and gives linking errors: >> > >> > Error 1 error LNK2001: unresolved external symbol >> > _sqlite3_db_filename >> > C:\Users\Bart\SQLiteForExcel\Source\SQLite3_StdCall\SQLite3_StdCall.obj >> > SQLite3_StdCall >> > Error 2 error LNK1120: 1 unresolved >> > externals >> C:\Users\Bart\SQLiteForExcel\Source\SQLite3_StdCall\Release\SQLite3_StdCall.dll >> > 1 1 SQLite3_StdCall >> > >> > Strangely it doesn't point to a line in the block SQLITE3_STDCALL_API but >> > points to line 1. >> > This is at the start of SQLite3_StdCall.c: >> > >> > #include "stdafx.h" >> > #include "SQLite3_StdCall.h" >> > >> > Compiling this on Windows 7 with Microsoft Visual Studio Professional >> > Studio 2013. >> > Admittedly, don't know anything about C or C++ or compiling C code, so I >> am >> > sure I must >> > be overlooking something simple and silly, but just can't figure it out. >> > Any ideas what could be the problem here? >> > >> > >> > RBS >> > _______________________________________________ >> > sqlite-users mailing list >> > sqlite-users at mailinglists.sqlite.org >> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users at mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >> BS> _______________________________________________ BS> sqlite-users mailing list BS> sqlite-users at mailinglists.sqlite.org BS> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users -- Teg mailto:Teg at djii.com