do not print spurious warnings when dlopen fails; can be re-enabled with -d:nimDebugDlOpen
This commit is contained in:
parent
deef047f27
commit
72f804671d
1 changed files with 4 additions and 3 deletions
|
|
@ -68,9 +68,10 @@ when defined(posix):
|
||||||
|
|
||||||
proc nimLoadLibrary(path: string): LibHandle =
|
proc nimLoadLibrary(path: string): LibHandle =
|
||||||
result = dlopen(path, RTLD_NOW)
|
result = dlopen(path, RTLD_NOW)
|
||||||
let error = dlerror()
|
when defined(nimDebugDlOpen):
|
||||||
if error != nil:
|
let error = dlerror()
|
||||||
c_fprintf(c_stdout, "%s\n", error)
|
if error != nil:
|
||||||
|
c_fprintf(c_stdout, "%s\n", error)
|
||||||
|
|
||||||
proc nimGetProcAddr(lib: LibHandle, name: cstring): ProcAddr =
|
proc nimGetProcAddr(lib: LibHandle, name: cstring): ProcAddr =
|
||||||
result = dlsym(lib, name)
|
result = dlsym(lib, name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue