Hi!
I have build DLL library. Here is code:
s.nim
proc t* {.exportc, dynlib, cdecl.} =
echo("test")
compiler parameters:
nim c --app:lib --d:useNimRtl s.nim
And I have build usual program who call t procedure from s.dll. Here is code:
hello.nim
proc t {.importc, dynlib: "./s.dll",cdecl.}
t()
compiler parameters:
nim c --app:console hello.nim
All this compiled under Windows 7. When I start hello.exe raise this error: http://i59.tinypic.com/v82dch.pngI get well over 100,000 hits on Google with that error message, but I think that a large portion of those are related to incorrect loading of the Microsoft C runtime.
This particular link may help
http://stackoverflow.com/questions/14993826/vc-runtime-to-terminate-it-in-an-unusual-way
Hopefully that helps track it down.