From 10ab814fbae0a54151028efd42ee9f806cc6bacd Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 16 Dec 2009 00:38:35 +0100 Subject: exprs for dynlib; indentation parsing --- tests/tdllvar.nim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 tests/tdllvar.nim (limited to 'tests/tdllvar.nim') diff --git a/tests/tdllvar.nim b/tests/tdllvar.nim new file mode 100755 index 000000000..ab767770c --- /dev/null +++ b/tests/tdllvar.nim @@ -0,0 +1,16 @@ +import os + +proc getDllName: string = + result = "mylib.dll" + if ExistsFile(result): return + result = "mylib2.dll" + if ExistsFile(result): return + quit("could not load dynamic library") + +proc myImport(s: cstring) {.cdecl, importc, dynlib: getDllName().} +proc myImport2(s: int) {.cdecl, importc, dynlib: getDllName().} + +myImport("test2") +myImport2(12) + + -- cgit 1.4.1-2-gfad0