Hi everybody, I'm trying to do K/N hands on, using...
# kotlin-native
m
Hi everybody, I'm trying to do K/N hands on, using libcurl. However on Windows, libcurl is not a system lib. I've downloaded binaries but I'm not sure where to drop them inside the project and whether additional buildscript changes are needed to reference it.
g
m
I was hoping to include lib with app, using
staticLibrary
and
libraryPaths
options. I'm still trying to figure those out
g
you can do this, just compile it statically
but to build your app you need libcurl dev installed on your computer, this is how native development mostly work with dependencies
m
On Windows you have to install MSYS2 and then
mingw-w64-x86_64-curl
I'm not sure that static linking is not broken - when I tried it (year ago) it did not work. But there was some fixes, maybe now it works: https://github.com/msys2/MINGW-packages/issues/3538
m
I think i managed to link libcurl but now I get missing references to ton of other libs 😄
m
Of course, you will need something like
Copy code
-static -lcurl
-lbrotlidec-static -lnghttp2 -lssh2 -lssl -lwldap32 -Wl,--start-group
-lbcrypt -lbrotlicommon-static -lcrypt32 -lcrypto -lws2_32 -lz
https://github.com/msys2/MINGW-packages/issues/3538#issuecomment-471379381