win32 sample uses platform.windows (#940)

This commit is contained in:
Mike Sinkovsky
2017-10-13 14:51:48 +05:00
committed by Nikolay Igotti
parent a4d1be443d
commit 83f798d5c4
3 changed files with 3 additions and 7 deletions
+1 -2
View File
@@ -6,5 +6,4 @@ if "%TARGET%" == "" set TARGET=mingw
set "LFLAGS=-Wl,--subsystem,windows"
call cinterop -def "%DIR%\src\main\c_interop\win32.def" -target "%TARGET%" -o win32 || exit /b
call konanc -target "%TARGET%" "%DIR%\src\main\kotlin\MessageBox.kt" -library win32 -linkerOpts "%LFLAGS%" -opt -o MessageBox || exit /b
call konanc -target "%TARGET%" "%DIR%\src\main\kotlin\MessageBox.kt" -linkerOpts "%LFLAGS%" -opt -o MessageBox || exit /b
@@ -1,3 +0,0 @@
headers = windows.h
headerFilter = win**.h
compilerOpts = -DUNICODE -Wno-incompatible-pointer-types -Wno-deprecated-declarations
+2 -2
View File
@@ -1,6 +1,6 @@
import win32.*
import platform.windows.*
fun main(args: Array<String>) {
MessageBoxW(null, "Konan говорит:\nЗДРАВСТВУЙ МИР!\n",
"Заголовок окна", MB_YESNOCANCEL or MB_ICONQUESTION)
}
}