我正在尝试在我的 Mac Lion 上用sqlcipher替换 POCO 的 sqlite。关于构建过程和替换的信息不多,但是我想我应该试一试。
我已经合并了 sqlcipher,然后我将 Data/Sqlite/src Poco 目录中的 sqlite3.c 和 sqlite3.h 替换为 sqlcipher 的那些,将 SQLITE_HAS_CODEC 和 SQLITE_TEMP_STORE=2 参数添加到 Makefile 并尝试构建它整件事情。
但是我收到以下错误:
Undefined symbols for architecture x86_64:
"_EVP_get_cipherbyname", referenced from:
_sqlcipher_activate in sqlite3.o
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
"_OPENSSL_add_all_algorithms_noconf", referenced from:
_sqlcipher_activate in sqlite3.o
"_RAND_bytes", referenced from:
_sqlcipher_random in sqlite3.o
"_EVP_CIPHER_key_length", referenced from:
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
"_EVP_CIPHER_iv_length", referenced from:
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
"_EVP_CIPHER_block_size", referenced from:
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
"_EVP_sha1", referenced from:
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
_sqlcipher_page_hmac in sqlite3.o
"_EVP_MD_size", referenced from:
_sqlcipher_codec_ctx_set_cipher in sqlite3.o
"_HMAC_CTX_init", referenced from:
_sqlcipher_page_hmac in sqlite3.o
"_HMAC_Init_ex", referenced from:
_sqlcipher_page_hmac in sqlite3.o
"_HMAC_Update", referenced from:
_sqlcipher_page_hmac in sqlite3.o
"_HMAC_Final", referenced from:
_sqlcipher_page_hmac in sqlite3.o
"_HMAC_CTX_cleanup", referenced from:
_sqlcipher_page_hmac in sqlite3.o
"_EVP_CipherInit", referenced from:
_sqlcipher_page_cipher in sqlite3.o
"_EVP_CIPHER_CTX_set_padding", referenced from:
_sqlcipher_page_cipher in sqlite3.o
"_EVP_CipherUpdate", referenced from:
_sqlcipher_page_cipher in sqlite3.o
"_EVP_CipherFinal", referenced from:
_sqlcipher_page_cipher in sqlite3.o
"_EVP_CIPHER_CTX_cleanup", referenced from:
_sqlcipher_page_cipher in sqlite3.o
"_PKCS5_PBKDF2_HMAC_SHA1", referenced from:
_sqlcipher_cipher_ctx_key_derive in sqlite3.o
ld: symbol(s) not found for architecture x86_64
以前有人试过吗?有人知道对此的潜在解决方法吗?谢谢!