Hi, I have an issue with `cinterop`. I do not unde...
# kotlin-native
s
Hi, I have an issue with
cinterop
. I do not understand why my definitions in
bthledef.h
are not accessible in Kotlin/Native for
mingw
when the header file is included and every other definition is generated. Why this file only? Why no output from the compiler at all? What is wrong with my project setup? Here is a link to the sample project: https://github.com/simonbrunou/kmm-native-interop-issue. Thank you for your help.
m
Copy code
--- a/src/nativeInterop/cinterop/bluetooth.def
+++ b/src/nativeInterop/cinterop/bluetooth.def
@@ -1,3 +1,2 @@
 headers = wtypesbase.h minwinbase.h minwindef.h winnt.h bluetoothleapis.h bthdef.h bthledef.h devguid.h regstr.h setupapi.h windows.h
-compilerOpts = -I/include
-linkerOpts = -I/include
+compilerOpts = -DNTDDI_VERSION=NTDDI_WIN8
--- a/src/nativeMain/kotlin/Main.kt
+++ b/src/nativeMain/kotlin/Main.kt
@@ -1,3 +1,4 @@
+import bluetooth.*
 import platform.posix.printf
 
 fun main() {
s
Amazing, thanks!