Print out more detailed error messages when compilation fails

This commit is contained in:
dfdeshom
2015-11-26 12:23:26 -06:00
parent 85345d2d34
commit 5b35efe5b7

View File

@@ -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)