mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
do not print spurious warnings when dlopen fails; can be re-enabled with -d:nimDebugDlOpen
This commit is contained in:
@@ -68,9 +68,10 @@ when defined(posix):
|
||||
|
||||
proc nimLoadLibrary(path: string): LibHandle =
|
||||
result = dlopen(path, RTLD_NOW)
|
||||
let error = dlerror()
|
||||
if error != nil:
|
||||
c_fprintf(c_stdout, "%s\n", error)
|
||||
when defined(nimDebugDlOpen):
|
||||
let error = dlerror()
|
||||
if error != nil:
|
||||
c_fprintf(c_stdout, "%s\n", error)
|
||||
|
||||
proc nimGetProcAddr(lib: LibHandle, name: cstring): ProcAddr =
|
||||
result = dlsym(lib, name)
|
||||
|
||||
Reference in New Issue
Block a user