Merge pull request #4848 from flyx/fix-debugdlopen
Fixed compilation error with -d:nimDebugDlOpen
This commit is contained in:
commit
754b99e435
1 changed files with 4 additions and 1 deletions
|
|
@ -26,6 +26,8 @@ proc nimLoadLibraryError(path: string) =
|
||||||
stderr.rawWrite("could not load: ")
|
stderr.rawWrite("could not load: ")
|
||||||
stderr.rawWrite(path)
|
stderr.rawWrite(path)
|
||||||
stderr.rawWrite("\n")
|
stderr.rawWrite("\n")
|
||||||
|
when not(defined(nimDebugDlOpen)):
|
||||||
|
stderr.rawWrite("compile with -d:nimDebugDlOpen for more information\n")
|
||||||
quit(1)
|
quit(1)
|
||||||
|
|
||||||
proc procAddrError(name: cstring) {.noinline.} =
|
proc procAddrError(name: cstring) {.noinline.} =
|
||||||
|
|
@ -74,7 +76,8 @@ when defined(posix):
|
||||||
when defined(nimDebugDlOpen):
|
when defined(nimDebugDlOpen):
|
||||||
let error = dlerror()
|
let error = dlerror()
|
||||||
if error != nil:
|
if error != nil:
|
||||||
c_fprintf(c_stderr, "%s\n", error)
|
stderr.write(error)
|
||||||
|
stderr.rawWrite("\n")
|
||||||
|
|
||||||
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