diff options
-rw-r--r-- | lib/system/dyncalls.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/system/dyncalls.nim b/lib/system/dyncalls.nim index 4043c8714..22ac613f8 100644 --- a/lib/system/dyncalls.nim +++ b/lib/system/dyncalls.nim @@ -68,7 +68,9 @@ when defined(posix): proc nimLoadLibrary(path: string): LibHandle = result = dlopen(path, RTLD_NOW) - #c_fprintf(c_stdout, "%s\n", dlerror()) + let error = dlerror() + if error != nil: + c_fprintf(c_stdout, "%s\n", error) proc nimGetProcAddr(lib: LibHandle, name: cstring): ProcAddr = result = dlsym(lib, name) |