I haven't used Tcl for about 6 years but I remember it on the rare
occassions when some scripting is required. Was glad to find the snmp
package but it is giving me a bit of trouble.
I changed to the c:\tcl\bin directory and found the familiar
wish85.exe and ran it. In the wish85 shell I changed the directory up
to c:\tcl and sourced net-snmp-tcl.tcl. The net-snmp-tcl directory is
under the c:\tcl directory but I get the following errors.
(Tcl) 11 % source net-snmp-tcl.tcl
Loading release NET-SNMP-TCL Library
couldn't load library "./net-snmp-tcl/release/netsnmptcl.dll": this
library or a dependent library could not be found in library path
(Tcl) 12 %
The following lines appear at the top of the file net-snmp-tcl.tcl and
I think the answer may be here but I am too rusty (or maybe too old)
to remember what I need to do. Any ideas (other than retire)?
Thanks,
jh
~~~~~~~~~~~~
if {[info exists DEBUG_NET-SNMP-TCL]} {
set dlltype debug
} else {
set dlltype release
}
global NET-SNMP-TCL
set NET-SNMP-TCL(DIR) [file join [file dirname [info script]] {usr/
bin}]
set dir [file join [file dirname [info script]] "net-snmp-tcl/
$dlltype"]
source $dir/pkgIndex.tcl
puts "Loading $dlltype NET-SNMP-TCL Library"
package require netsnmptcl
Normally, if net-snmp-tcl was installed by a normal install process,
one would start a tclsh8.5 type interpreter then say
package require net-snmp-tcl
and all the necessary variables and paths would be set up as the
package expected.
However, if in this case the code was dropped into place by hand, then
I'm not certain what else would be needed.
Hello jh,
I don't know the net-snmp package. The normal way is to call
> package require <your package name>
Then all dependencies are handled. When you use package require tcl
assumes that the directory is in its search path, the variable:
auto_path.
Type in the wish8.5:
> set auto_path
In case C:\Tcl is not in this list append the directory with:
> lappend auto_path C:/Tcl
Yes, the slash is correct. No backslash.
After this package require should work. However if the dll
netsnmptcl.dll is really missing tcl can't do anything about it.
Ruediger
I just took the time to do what you described. I have the same error.
Looking at the dependencies of the dll it is obvious that it shows
this error. It depends on the tcl83.dll which can not be found on my
setup and probably not on yours.
Either install tcl8.3 or recompile it.
Cheers,
Ruediger
Hm, that would mean it is not stubs-enabled, would it not?
Perhaps OP should look for a stubs-enabled version (I do not
know much about the package, so I can not help there).
Regards,
Arjen