Has anyone successfully linked a rust static library to a kotlin mingwx64 target?
y
Yorgos S.
10/07/2024, 9:06 PM
Yes, I managed to do it in this project. https://github.com/smyrgeorge/sqlx4k
To be honest never tested on windows, but still though the compilation succeeded
c
Caleb Kiage
10/08/2024, 9:32 AM
When building sqlx4k on windows, linking fails for executable targets.
Copy code
.../clang++ command returned non-zero exit code: 1.
output:
lld-link: warning: ignoring unknown argument: -exclude-symbols:___chkstk_ms
lld-link: error: -exclude-symbols:___chkstk_ms is not allowed in .drectve
lld-link: warning: ignoring unknown argument: -exclude-symbols:__floattidf
lld-link: error: -exclude-symbols:__floattidf is not allowed in .drectve
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
y
Yorgos S.
10/08/2024, 9:47 AM
Perhaps is due to the old llvm version (11). The next upcoming kotlin release 2.1.0 maybe will resolve this issue. They changed the llvm version to 16. Take a try using koltin