How to compile K/N program with static linking? I ...
# kotlin-native
д
How to compile K/N program with static linking? I not need link with local libc. I can compile as static library, then compile with C stub and use ld options for static build, but may be there's a more convenient way?
1
👀 1
b
Docs on this are very lacking. I've tried static linking to libmongoc a while ago with no success...
m
Just adding to linkerOpts does not work? Didn't check it on Linux/Mac, but on Windows it works:
Copy code
linkerOpts(
        "-L${yourLibPath}",
        "-Wl,-Bstatic",
        "-lstdc++",
        "-static",
        "-lyourLib",
        "-lyourLib2",
        ...
    )