Closed PMunch closed 4 years ago
This code works for me:
# dll.nim
import wNim
proc MyMessageBox(hwnd: int) {.exportc, cdecl, dynlib.} =
let app = App()
let frame = Frame(owner = Window(hwnd), title="Hello world", size=(400, 300))
frame.center()
frame.show()
app.mainLoop()
setupForeignThreadGc()
nim c --app:lib --passL:-static --threads:on --tlsEmulation:off dll
I'm trying to use a Nim compiled DLL to create a custom page in InnoSetup to be able to more easily add functionality without having to struggle with PascalScript. Now using something like this with
winim
works fine:But trying to modify that to use
wNim
instead is proving difficult (I trimmed it down so it's only trying to create a frame):This leaves me with this error message on Windows:
And under Wine on Linux I see this error while the program just hangs:
When I abort the procedure the stack track for the SIGINT is:
Any idea what I'm doing wrong? Or rather how I can do this correctly?