amodule.nim 268 B

12345678910
  1. import os
  2. proc findlib: string =
  3. let path = getEnv("MYLIB_DOES_NOT_EXIST_PATH")
  4. if path.len > 0 and dirExists(path):
  5. path / "alib_does_not_matter.dll"
  6. else:
  7. "alib_does_not_matter.dll"
  8. proc imported_func*(a: cint): cstring {.importc, dynlib: findlib().}