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