alexcouch
03/31/2019, 4:22 AMmsink
03/31/2019, 7:26 AM.a
, not .lib
.
See https://github.com/msink/kotlin-libui/blob/master/libui/src/nativeInterop/cinterop/libui.def#L5alexcouch
03/31/2019, 11:07 AMalexcouch
03/31/2019, 11:08 AMmsink
04/01/2019, 7:58 AMcd /f/src/hidapi
./bootstrap
./configure
make
make install
Got libhidapi.a
and libhidapi.dll.a
in msys64\mingw64\lib
directory.alexcouch
04/01/2019, 8:29 AMalexcouch
04/01/2019, 8:29 AMmsink
04/01/2019, 8:38 AM.lib
- it's K/N documentation bug.alexcouch
04/01/2019, 9:17 AMsvyatoslav.scherbina
04/01/2019, 9:30 AMalexcouch
04/01/2019, 9:35 AMC:\Users\Alex\Desktop\hidstuff>kotlinc-native -g src/*.kt -l out/cinterop/hidapi.klib -linker-options "libs\hidapi\hidapi.lib"
C:\Users\Alex\AppData\Local\Temp\konan_temp2160950149983819903\combined.o:(.text+0x29285): undefined reference to `hid_init'
C:\Users\Alex\AppData\Local\Temp\konan_temp2160950149983819903\combined.o:C:\BuildAgent\work\4d622a065c544371\runtime\src\main\kotlin\kotlin\text\regex\sets/DecomposedCharSet.kt:50: undefined reference to `hid_exit'
C:\Users\Alex\AppData\Local\Temp\konan_temp2160950149983819903\combined.o:C:\BuildAgent\work\4d622a065c544371\runtime\src\main\kotlin\kotlin\text\regex\sets/DecomposedCharSet.kt:50: undefined reference to `hid_enumerate'
C:\Users\Alex\AppData\Local\Temp\konan_temp2160950149983819903\combined.o:C:\BuildAgent\work\4d622a065c544371\runtime\src\main\kotlin\kotlin\text\regex\sets/DecomposedCharSet.kt:50: undefined reference to `hid_open_path'
C:\Users\Alex\AppData\Local\Temp\konan_temp2160950149983819903\combined.o:C:\BuildAgent\work\4d622a065c544371\runtime\src\main\kotlin\kotlin\text\regex\sets/DecomposedCharSet.kt:50: undefined reference to `hid_close'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
error: c:\Users\Alex\.konan\dependencies\msys2-mingw-w64-x86_64-gcc-7.3.0-clang-llvm-lld-6.0.1/bin/clang++ invocation reported errors
alexcouch
04/01/2019, 9:35 AMmsink
04/01/2019, 9:39 AMalexcouch
04/01/2019, 9:49 AM