From 7f5e420c3e6cba41b5e710be95437aa5acaf4712 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 10 Feb 2000 09:53:53 +0000 Subject: * doc/load.n: added notes about dll load errors on Windows --- doc/load.n | 24 ++++++++++++++++-------- win/tclWinLoad.c | 4 ++-- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/doc/load.n b/doc/load.n index e0deb20..b375b9d 100644 --- a/doc/load.n +++ b/doc/load.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: load.n,v 1.3 1999/12/04 06:15:26 hobbs Exp $ +'\" RCS: @(#) $Id: load.n,v 1.4 2000/02/10 09:53:53 hobbs Exp $ '\" .so man.macros .TH load n 7.5 Tcl "Tcl Built-In Commands" @@ -106,19 +106,27 @@ different files have been \fBload\fRed with different versions of the package, Tcl picks the file that was loaded first. .VE +.SH "PORTABILITY ISSUES" +.TP +\fBWindows\fR\0\0\0\0\0 +. +When a load fails with "library not found" error, it is also possible +that a dependent library was not found. To see the dependent libraries, +type ``dumpbin -imports '' in a DOS console to see what the +library must import. +When loading a DLL in the current directory, Windows will ignore ``./'' as +a path specifier and use a search heuristic to find the DLL instead. +To avoid this, load the DLL with +.CS + load [file join [pwd] mylib.DLL] +.CE + .SH BUGS .PP If the same file is \fBload\fRed by different \fIfileName\fRs, it will be loaded into the process's address space multiple times. The behavior of this varies from system to system (some systems may detect the redundant loads, others may not). -.PP -When loading a DLL in the current directory, NT will ignore ``./'' as -a path specifier and use a search heuristic to find the DLL instead. -To avoid this, load the DLL with -.CS - load [file join [pwd] mylib.DLL] -.CE .SH "SEE ALSO" \fBinfo sharedlibextension\fR, Tcl_StaticPackage, safe(n) diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index a962b7a..360b629 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.4 2000/02/10 08:55:39 hobbs Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.5 2000/02/10 09:53:57 hobbs Exp $ */ #include "tclWinInt.h" @@ -87,7 +87,7 @@ TclpLoadFile(interp, fileName, sym1, sym2, proc1Ptr, proc2Ptr, clientDataPtr) case ERROR_MOD_NOT_FOUND: case ERROR_DLL_NOT_FOUND: Tcl_AppendResult(interp, "this library or a dependent library", - " could not be found", (char *) + " could not be found in library path", (char *) NULL); break; case ERROR_INVALID_DLL: -- cgit v0.12