Iooked at that underscore (in _sqlite3_db_filename) as well, but that is
just how VS presents the error, it didn't find a faulty underscore in the
code. So, that is not it. As far as I can see the SQLite3 functions in this
project are only in 3 places: sqlite3.h, SQLite3_StdCall.c and in the .def
file. sqlite3_db_filename is in all 3 and all seems to be spelled right.

Not sure if it gives any more information, but this is the build output:

1>------ Build started: Project: SQLite3_StdCall, Configuration: Release
Win32 ------

1> SQLite3_StdCall.c

1> Creating library
C:\Users\Bart\SQLiteForExcel\Source\SQLite3_StdCall\Release\SQLite3_StdCall.lib
and object
C:\Users\Bart\SQLiteForExcel\Source\SQLite3_StdCall\Release\SQLite3_StdCall.exp

1>SQLite3_StdCall.obj : error LNK2001: unresolved external symbol
_sqlite3_db_filename

1>C:\Users\Bart\SQLiteForExcel\Source\SQLite3_StdCall\Release\SQLite3_StdCall.dll
: fatal error LNK1120: 1 unresolved externals

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



RBS

On Sun, Mar 1, 2015 at 7:10 AM, Amit Chaudhuri <amit.k.chaudhuri at gmail.com>
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
>

Reply via email to