How to compile a shared library on Linux? I tried ...
# kotlin-native
b
How to compile a shared library on Linux? I tried but got a ld error.
a
Hello, @benny.huo! Could you please add more details, or even a project to reproduce this problem? Is this relevant for all Kotlin/Natve versions, or some specific one? Information about the environment would also help. If there is something non-public, consider opening issue here kotl.in/issue and using
Kotlin Team
visibility option.
b
Kotlin 1.4.10/1.4.20.
a
Just found https://youtrack.jetbrains.com/issue/KT-43502 suppose this is related, right?
b
Issue here: https://youtrack.jetbrains.com/issue/KT-43502 I will try to commit a demo later.
Yes.
Btw, It’s ok to build shared library or executable on MacOS or to build an executable on Linux.
Demo here to reproduce error: https://github.com/enbandari/KotlinNativeLinuxfPICError I also tried 1.3.72 with korio, same problem, pushed as a new branch kt1.3.72.
🙏 1
👀 1
Thanks for the quick reply. I am trying to migrate some android code to Ubuntu native as a shared library. If the problem continues, maybe I should seek a plan B …. 😩
@Artyom Degtyarev [JB] Can I expect a quick fix for this?