Question

I am unable to build sqlcipher on Windows with following these steps.

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

At the link stage, gcc gives this error:

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
Was it helpful?

Solution

You forget to define SQLITE_TEMP_STORE as document has specified.

I can confirm it's working smoothly on Ubuntu 12.04 LTS , with latest source on github:

enter image description here

In short for dynamic linking:

./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2" LDFLAGS="-lcrypto"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top