lilypuchi
04/26/2022, 11:36 AMdata
layer classes along with the dependencies (sqldelight) from :shared
to a new Multiplatform module :data
. But since then, iOS doesn’t build with the following error :
Undefined symbols for architecture arm64:
"_sqlite3_column_type", referenced from:
_co_touchlab_sqliter_sqlite3_sqlite3_column_type_wrapper108 in result.o
"_sqlite3_bind_parameter_index", referenced from:
_co_touchlab_sqliter_sqlite3_sqlite3_bind_parameter_index_wrapper84 in result.o
...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared:linkDebugFrameworkIosArm64'.
> Compilation finished with errors
shared/build.gradle.kts
looked like this before creating :data
module.
val commonMain by getting {
dependencies {
implementation("com.squareup.sqldelight:runtime:$sqldelight")
implementation("com.squareup.sqldelight:coroutines-extensions:$sqldelight")
}
}
val androidMain by getting {
dependencies {
implementation("com.squareup.sqldelight:android-driver:$sqldelight")
}
}
val iosMain by creating {
dependencies {
implementation("com.squareup.sqldelight:native-driver:$sqldelight")
}
dependsOn(commonMain)
iosX64Main.dependsOn(this)
..
}
After creating :data
and moving these dependencies to data/build.gradle.kts
, I just added this in shared/build.gradle.kts
val commonMain by getting {
dependencies {
implementation(project(":data"))
}
}
I haven’t changed anything else. Am I missing out on anything here ? 🤔Anton Lakotka [JB]
04/26/2022, 1:07 PM./gradlew linkDebugFrameworkIosArm64 --debug
and then find in the logs the konan arguments.
Then you can compare what was before and after.
From my side, it looks like some sqlite dependencies are missing.russhwolf
04/26/2022, 2:56 PM-lsqlite3
compiler arg passed in your shared module. It get’s added automatically in the module where you have the SqlDelight gradle plugin applied, but you need to add it manually for other modules that talk to your SqlDelight code but don’t have the plugin.lilypuchi
04/27/2022, 3:39 AM-lsqlite
worked! Thanks a lot both of you 😄