Hello,
I'm trying to use this glfw wrapper: https://github.com/ephja/nim-glfw. I clone the repo, enter the examples directory, and execute nim c -r minimal.nim, just as the documentation provides. Compilation succeeds, great! Now I attempt to run minimal.exe but I get a runtime error: could not import: glfwSetWindowUserPointer*
What I've tried so far:
At this point I don't know what else to try. I'm on Windows 8.1 64 bit running Nim 0.17.2. Any tips would be appreciated. Thank you.
The executable is 64-bit. Araq, that would be a logical explanation. Any tips on how I can confirm this? nim-glfw appears to me to use cdecl calling convention, as hinted by this code snippet in glfw.nim:
proc renameProcs(n: NimNode) {.compileTime.} =
template pragmas(n: string) = {.glfwImport, cdecl, importc: n.}
for s in n:
case s.kind
of nnkProcDef:
let oldName = $s.name
let newName = "glfw" & (oldName[0]).toUpperAscii & oldName[1..^1]
s.pragma = getAst(pragmas(newName))[0]
else:
renameProcs(s)
The glfw library also appears to use cdecl calling convention.