Linker errors building SQLCipher on MacOS

Hello,

I am getting linker errors when building SQLCipher 3.28.0 on MacOS 10.14.6.

Here is my configuration line:

./configure --enable-tempstore=yes --with-crypto-lib=commoncrypto CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/System/Library/Frameworks/Security.framework/Versions/Current/Security /System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation"

And here are the errors:

Undefined symbols for architecture x86_64:
“_CFBundleGetBundleWithIdentifier”, referenced from:
_sqlcipher_cc_get_provider_version in sqlite3.o
“_CFBundleGetValueForInfoDictionaryKey”, referenced from:
_sqlcipher_cc_get_provider_version in sqlite3.o
“_CFStringGetCStringPtr”, referenced from:
_sqlcipher_cc_get_provider_version in sqlite3.o
“_SecRandomCopyBytes”, referenced from:
_sqlcipher_cc_random in sqlite3.o
“___CFConstantStringClassReference”, referenced from:
CFString in sqlite3.o
CFString in sqlite3.o
“_kSecRandomDefault”, referenced from:
_sqlcipher_cc_random in sqlite3.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: *** [libsqlcipher.la] Error 1

I intend to build 64 bit and I did check the frameworks - they contain both 32 and 64 bit architectures.

Any help with this would be very much appreciated - Thanks!

Hi @i3h20

You might try adjusting how you are linking to the frameworks:

Ahh… how embarrassing ))

Thank you!

Hi @i3h20

We are happy to hear you were able to resolve the issue. Take care!