If you are including the amalgamation directly into the build you should not include -lsqlite3 as a linker flag. It will cause the system sqlite3 library to be linked.
Thank you. That makes sense.
I included it after the linker complained about missing sqlite.
What could be wrong if I’m including the amalgamation directly but the linker still complains about sqlite3 being missing.
Is maybe the settings of linkSqlite.set(false) not working?
Hello @dusiema - if the linker is complaining about missing SQLite, I would look at the build log to see if sqlite3.o, which you mentioned is being generated, is actually being used at the link step. It would also be helpful to know what the exact linker errors are.
Undefined symbols for architecture arm64:
"_sqlite3_bind_blob", referenced from:
_co_touchlab_sqliter_sqlite3_sqlite3_bind_blob_wrapper69 in result.o
"_sqlite3_bind_double", referenced from:
_co_touchlab_sqliter_sqlite3_sqlite3_bind_double_wrapper71 in result.o
...
> Task :shared:linkDebugFrameworkIos FAILED
...
I cleaned the build in xCode and started the build again then looked for a sqlite3.o file in ~/Library/Developer/Xcode/DerivedData/<myAppFolder>.
But all I can find is a sqlite3.o-39ESKFLVMZ17D file at
I wonder if the combination of sqldelight, SQLiter and SQLCipher in a Kotlin Multiplatform App-Project only works with Cocoapods and not with the source/amalgamation integration?
Almost all the documentation I can find uses Cocoapods and kind of recommends it. In this article by Sam Hill he states:
…This will handle all the CInterop for you and fulfill SQLiter’s requirements…
Whatever those requirements exactly are. I was hoping I could get away with not introducing Cocoapods into my project.
It seems to me the linking of lsqlite3 is necessary for SQLiter to work.