SQLCipher, OS X, and -arch madness
LTCOMPILE_EXTRAS=”-arch i386 -arch x86_64” make
OS X ships a FAT libsqlite3.dylib. It includes both x86_64 and i386 (and ppc7400) code. I’m trying to write a ruby extension that can call the new sqlite3_key() methods from C, rather than just going through “PRAGMA” in Ruby.
Getting my new library to link to the new SQLCipher build has been driving me up the wall. Luckily, there it is! Add both architectures in the LTCOMPILE_EXTRAS environment and run make.
Architectures in the fat file: .libs/libsqlite3.dylib are: i386 x86_64
Of course, now how do I figure out how to get a sqlite3* in C when my database connection is actually being initialized from Ruby!?