开发者

What’s the correct way to build the SQLite FTS extension as a DLL?

开发者 https://www.devze.com 2023-01-20 01:40 出处:网络
What’s the recommended way to build the SQLite FTS3 extension as a Windows DLL? I’m having the following problem:

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.


Main instructions: http://eli.thegreenplace.net/2009/09/23/compiling-sqlite-on-windows/

But use these preprocessor definitions:

SQLITE_ENABLE_COLUMN_METADATA

SQLITE_ENABLE_FTS3

SQLITE_ENABLE_FTS3_PARENTHESIS

SQLITE_ENABLE_RTREE

ignore int / i64 and float/double warnings

0

精彩评论

暂无评论...
验证码 换一张
取 消