我无法在Windows上使用以下steps构建sqlcipher。
install Win32 OpenSSL v0.9.8m
install TclTk
rename MINGWPATH/bin/tclsh84.exe to tclsh.exe
cd sqlcipher
$ ./configure --disable-tcl --disable-amalgamation
CFLAGS="-DSQLITE_HAS_CODEC -I../OpenSSL/include /c/Windows/System32/libeay32.dll"
$ make
$ make dll
$ make install
在链接阶段,gcc会出现此错误:
libtool: link: gcc -g -O2 -DSQLITE_OS_WIN=1 -I. -I./src -I./ext/rtree -D_HAVE_SQ
LITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_E
XTENSION=1 -DHAVE_READLINE=0 -o .libs/sqlite3.exe ./src/shell.c ./.libs/libsqli
te3.a -lpthread -L/usr/local/lib
./.libs/libsqlite3.a(func.o): In function `sqlite3RegisterBuiltinFunctions':
c:\sqlcipher/./src/func.c:1439: **undefined reference to `sqlcipher_exportFunc**'
collect2: ld çıkış durumu 1 ile döndü
make: *** [sqlite3.exe] Error 1
答案 0 :(得分:1)
您忘记在文档指定时定义SQLITE_TEMP_STORE
。
我可以确认它在Ubuntu 12.04 LTS上运行顺利,在github上有最新的源代码:
简称动态链接:
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2" LDFLAGS="-lcrypto"