- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我已经使用 Visual C++ 2008 在 Windows 7 上编译了 sqlite在“sqlite3.c”文件中启用 FTS4,如下所示
#ifndef SQLITE_ENABLE_FTS3
#define SQLITE_ENABLE_FTS3
#define SQLITE_ENABLE_FTS4
#define SQLITE_ENABLE_FTS3_PARENTHESIS
#endif
调试版本工作正常,但发布版本失败并出现错误尝试创建表时“没有这样的模块 FTS3”
CREATE VIRTUAL TABLE DOCS USING FTS3(DOC_NAME, DOC)
这是怎么回事?
最佳答案
来自 http://www.sqlite.org/fts3.html
部分2。编译和启用 FTS3 和 FTS4
If using the amalgamation autoconf based build system, setting the CPPFLAGS environment variable while running the 'configure' script is an easy way to set these macros. For example, the following command:
CPPFLAGS="-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS" ./configure <configure options>
那些通常传递给配置脚本的选项(如果有的话)在哪里。
Because FTS3 and FTS4 are virtual tables, The SQLITE_ENABLE_FTS3 compile-time option is incompatible with the SQLITE_OMIT_VIRTUALTABLE option.
If a build of SQLite does not include the FTS modules, then any attempt to prepare an SQL statement to create an FTS3 or FTS4 table or to drop or access an existing FTS table in any way will fail. The error message returned will be similar to "no such module: ftsN" (where N is either 3 or 4).
If the C version of the ICU library is available, then FTS may also be compiled with the SQLITE_ENABLE_ICU pre-processor macro defined. Compiling with this macro enables an FTS tokenizer that uses the ICU library to split a document into terms (words) using the conventions for a specified language and locale.
-DSQLITE_ENABLE_ICU
关于c - 如何在 Windows 上的 sqlite3 中启用全文搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7163566/
我是一名优秀的程序员,十分优秀!