From: Helmut Giese on
Hi Mona,
>It finds the built package just fine if I I do "package require tkpng"
>from the
>installation directory, i.e. where tkpng09.dll is at. But, when
>I try to use the package from some other folder location it complains:
>�couldn't load library "C:/my_sandbox/third_party/tcl/tcl8.5.6/win32d/
>lib/tkpng0.9/tkpng09d.dll": this library or a dependent library could
>not be found in library path.�
the key may be
or a dependent library could not be found in library path

The search order for DLLs on Windows is far from obvious. If
everything your program needs is in the current directory, things
usually work, but if you are somewhere else things can get
complicated.

1) Get dependency walker (www.dependencywalker.com or similar)
and let it check which other DLLs your tkpng09d.dll needs.

2) Post your pkgindex.tcl file here - I am not much of an expert with
these, but maybe someone who is will join.

3) Describe how your system is organized:
a) Path to your Tcl installation
b) Path to your tkpng stuff
c) From where do you a 'package require'

Best regards
Helmut Giese
From: Spam on
On Fri, 19 Mar 2010, Mona wrote:

> yes, i am using the --exec-prefix and --prefix to setup the
> installation directory. The "make" and "make install" goes fine.
> And, it is installing/copying the tkpng09 dll in "C:/my_sandbox/
> third_party/tcl/tcl8.5.6/win32d/
> lib/tkpng0.9". And, so when I do "package require tkpng" in this
> folder through my wish console, then it loads the package just fine.
> But if I am in say, "C:/my_sandbox/third_party/tcl/tcl8.5.6" or any
> other folder other than where tkpng dll is, then it complains with
> "couldn't load library" message.
> What can be wrong?
>
> Thanks.
>

what happens if at a wish prompt you type:

load "C:/my_sandbox/third_party/tcl/tcl8.5.6/win32d/lib/tkpng0.9.dll"

????

IIRC, Windows disallows more than a single '.' (DOT) in a file name.
Is this still true? If so, what is the name of the actual dll, and where is
it located?? does it have a .so or .dll (or .lib or .a) extension??

Perhaps pkg_mkIndex might be of some help here ...

Cheers,
Rob.
From: Mona on
>
> what happens if at a wish prompt you type:
>
>         load "C:/my_sandbox/third_party/tcl/tcl8.5.6/win32d/lib/tkpng0.9.dll"
>
> ????

same error "couldn't load library "../lib/tkpng0.9/tkpng09d.dll": this
library or a dependent library could not be found in library path".

> 1) Get dependency walker (www.dependencywalker.com or similar)
> and let it check which other DLLs your tkpng09d.dll needs.
dependency walker gives no errors - it finds all related dlls

>2) Post your pkgindex.tcl file here - I am not much of an expert with
>these, but maybe someone who is will join.
pkgIndex.tcl file is:
"
#
# Tcl package index file
#
package ifneeded tkpng 0.9 \
[list load [file join $dir tkpng09.dll] tkpng]
"
> 3) Describe how your system is organized
Win32xp
> a) Path to your Tcl installation
C:/my_sandbox/third_party/tcl/tcl8.5.6/win32d

> b) Path to your tkpng stuff
C:/my_sandbox/third_party/tcl/tcl8.5.6/win32d/lib/tkpng0.9

> c) From where do you a 'package require'
from anywhere in C:/my_sandbox
From: Helmut Giese on
Hi Mona,
>> 1) Get dependency walker (www.dependencywalker.com or similar)
>> and let it check which other DLLs your tkpng09d.dll needs.
>dependency walker gives no errors - it finds all related dlls
you misunderstood. Dependency walker will find all DLLs - the question
was: Which _other_ DLL does tkpng09.d.dll need?

When you run dendency walker you see in the left pane all DLLs your
DLL depends on. Ignore system DLLs like kernel.dll and user.dll - but
tell if it lists any other DLL.
Good luck
Helmut Giese

>>2) Post your pkgindex.tcl file here - I am not much of an expert with
>>these, but maybe someone who is will join.
>pkgIndex.tcl file is:
>"
>#
># Tcl package index file
>#
>package ifneeded tkpng 0.9 \
> [list load [file join $dir tkpng09.dll] tkpng]
>"
>> 3) Describe how your system is organized
>Win32xp
>> a) Path to your Tcl installation
>C:/my_sandbox/third_party/tcl/tcl8.5.6/win32d
>
>> b) Path to your tkpng stuff
>C:/my_sandbox/third_party/tcl/tcl8.5.6/win32d/lib/tkpng0.9
>
>> c) From where do you a 'package require'
>from anywhere in C:/my_sandbox