views:

16

answers:

0

What’s the recommended way to build the SQLite FTS3 extension as a Windows DLL?

I’m having the following problem:

fts3_tokenizer.obj : error LNK2005: sqlite3_api already defined in fts3.obj

The macro SQLITE_EXTENSION_INIT1 is used in both fts3_tokenizer.c and fts3.c. It creates a global variable named sqlite3_api, and since this is done in two places, there are two global variables of the same name. Hence the problem.

Note: Although FTS can be compiled into SQLite, I would like a DLL so I can dynamically load the extension into environments where I have a pre-compiled SQLite that doesn’t have full text search.