I’m trying to use SQLCipher with Couchbase Lite and I’d like to compile it as a dynamic library. Unfortunately all my attempts have been futile with varying types of errors after I compile.
I tried using the Xcode project that comes with SQLCipher and changing the library type from Static to dynamic, but that didn’t seem to work. Although I could build the library, it didn’t work when I tried to use it. It was unable to open any of my encrypted database files.
I also tried using the command-line with the following config:
./configure --enable-load-extension --enable-tempstore=yes --with-crypto-lib=commoncrypto CFLAGS="-DSQLITE_HAS_CODEC -mmacosx-version-min=10.10 -arch x86_64 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4_UNICODE61" LDFLAGS="/System/Library/Frameworks/Security.framework/Versions/Current/Security"
But I didn’t see where the .dylib file was generated other than inside a hidden .libs folder. I took the libsqlcipher.0.dylib file from within there and tried to link it to my app, but upon launch I just got an “image not found” error: dyld: Library not loaded: /usr/local/lib/libsqlcipher.0.dylib
Any suggestions for what to try are welcome.
I posted this same message on the SQLCipher Google groups, but forgot that this is where we discuss SQLCipher now. So sorry for the double post.