https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
f

Fail

07/24/2019, 2:23 PM
Friends. Collecting multiplatform. I do everything on this link: https://kotlinlang.org/docs/reference/native/cocoapods.html In principle, all the rules, the library was assembled, POD was exported. But when it connected to the Xcode project - I see errors:
Copy code
Undefined symbols for architecture x86_64:
  "_sqlite3_bind_text16", referenced from:
      _SQLiter_SQLiteStatement_nativeBindString in app(combined.o)
  "_sqlite3_bind_int64", referenced from:
.....
Solved🎉
My gradle:
k

kpgalligan

07/24/2019, 2:59 PM
The error is simple. Your linker settings need
-lsqlite3
in them. Why you’re seeing it is not so simple, though. In theory that should be there already
OK. Interesting
We’ve been using cocoapods and Kotlin in larger projects, and I think
-lsqlite3
is being added by other Pods. Try the following. Open your main app in Xcode
Open the settings screen, search for “linker” and find “Other Linker Flags”
Press the value once, and it should open a text box. It should have
${inherited}
in it
Add
-lsqlite3
Make sure there’s a space after
${inherited}
. Also, to be clear, that’s “dash”, the lower case letter “L”, and “sqlite3”
The sqldelight plugin was adding that during compile, but I think that config gets lost when using cocoapods
f

Fail

07/24/2019, 3:33 PM
I have to buy you a beer. Thank you. It great!
k

kpgalligan

07/24/2019, 3:34 PM
Deal! Glad it worked out.