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

Reply via email to