Hello!
1. Compiling as library
ve...@veter-laptop:/mnt/work/chroot/lenny/tmp/sqlite3-3.6.20/ext/virtualtext$ ls
virtualtext.c
ve...@veter-laptop:/mnt/work/chroot/lenny/tmp/sqlite3-3.6.20/ext/virtualtext$
gcc -fPIC -lm -shared virtualtext.c ../iconv/iconv.c -o libsqlitevirtualtext.so
virtualtext.c: In function ‘text_clean_text’:
virtualtext.c:328: warning: assignment makes pointer from integer without a cast
virtualtext.c: In function ‘text_parse’:
virtualtext.c:587: warning: assignment makes pointer from integer without a cast
ve...@veter-laptop:/mnt/work/chroot/lenny/tmp/sqlite3-3.6.20/ext/virtualtext$ ls
libsqlitevirtualtext.so virtualtext.c
If MinGW does not recognize it try these commands:
gcc -fPIC -lm -L../iconv/ -shared virtualtext.c -o libsqlitevirtualtext.so
or
gcc -fPIC -lm -L../iconv/ -shared virtualtext.c ../iconv/iconv.c -o
libsqlitevirtualtext.so
2. Compiling with SQLite
2.1 Patch main.c like to
#ifdef SQLITE_ENABLE_ICU
# include "sqliteicu.h"
#endif
+#ifdef SQLITE_ENABLE_VIRTUALTEXT
+# include "iconv.h"
+#endif
...
+#ifdef SQLITE_ENABLE_VIRTUALTEXT
+ if( !db->mallocFailed && rc==SQLITE_OK ){
+ rc = sqlite3VirtualTextInit(db);
+ }
+#endif
+
sqlite3Error(db, rc, 0);
.
/* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking
2.2. Patch mksqlite3c.tcl
sqliteLimit.h
vdbe.h
vdbeInt.h
+
+ iconv.h
} {
set available_hdr($hdr) 1
}
...
tokenize.c
complete.c
+ iconv.c
+ virtualtext.c
+
main.c
notify.c
.
2.3 Patch Makefile.in
SRC += \
$(TOP)/ext/rtree/rtree.h \
$(TOP)/ext/rtree/rtree.c
+SRC += \
+ $(TOP)/ext/iconv/iconv.h \
+ $(TOP)/ext/iconv/iconv.c \
+ $(TOP)/ext/virtualtext/virtualtext.c
2.4 Build SQLite with option -DSQLITE_ENABLE_VIRTUALTEXT
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users