Hello folks, I need a bit of help with `ktor-clien...
# ktor
e
Hello folks, I need a bit of help with
ktor-client
. I’m trying to write a very simple http-get call in a macos native app. For the following dependencies:
Copy code
val macosMain by getting {
            dependencies {
                implementation(kotlin("stdlib-common"))
                implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutinesVersion")
                implementation("io.ktor:ktor-client-core-macosx64:$ktorVersion")
                implementation("io.ktor:ktor-client-curl:$ktorVersion")
I get a very terse
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
at the
linkDebugExecutableMacos
step. FWIW, if I omit
implementation("io.ktor:ktor-client-curl:$ktorVersion")
the linker at least manages to complete. (The executable crashes, ktor expects an engine, which should be
ktor-client-curl
from what I understand) I’ve tried adding curl to the build with
Copy code
macosX64("macos") {
        binaries {
            all {
                linkerOpts.add("-L/usr/local/opt/curl/lib")
                linkerOpts.add("-lcurl")
and that doesn’t seem to do any difference. My first question is: What could I do to make
ld
a bit more verbose with it’s error message here? (Making gradle more verbose hasn’t helped) Second question: Am I missing a dependency for ktor? Any clues welcome. 🙂