Files
Nim/tests/cpp/amodule.nim
cooldome 221c67b880 fixes #9222 (#9224)
(cherry picked from commit 036c52f0b6)
2018-11-01 17:26:15 +01:00

10 lines
268 B
Nim

import os
proc findlib: string =
let path = getEnv("MYLIB_DOES_NOT_EXIST_PATH")
if path.len > 0 and dirExists(path):
path / "alib_does_not_matter.dll"
else:
"alib_does_not_matter.dll"
proc imported_func*(a: cint): cstring {.importc, dynlib: findlib().}