“ld: warning: ld: warning: ignoring file /usr/local/lib/libsqlcipher.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/lib/libsqlcipher.a”.
It sounds like the architecture you may have installed does not match with the platform you are compiling for (e.g., i386 vs. x86_64). You might consider building the OpenSSL libraries yourself, then link those with your qsqlcipher-qt5 project.
I built them, but nothing changes. May be gcc was used instead of clang and this is the root of the problem. Can you suggest how to force Clang usage for building OpenSSL and SQLCipher?
Also I get an error when try to run “make tests”:
gcc -DSQLITE_HAS_CODEC -I/opt/libs/openssl-1.1.1b-macos-x64/include/ -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -o sessionfuzz ~/Projects/Cpp/sqlcipher/test/sessionfuzz.c -lz -lcrypto
Undefined symbols for architecture x86_64:
"_HMAC_CTX_free", referenced from:
_sqlcipher_openssl_hmac in sessionfuzz-7bec5e.o
"_HMAC_CTX_new", referenced from:
_sqlcipher_openssl_hmac in sessionfuzz-7bec5e.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sessionfuzz] Error 1
And how to specify cross compile of sqlcipher to iOS?