Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trouble sourcing

20 views
Skip to first unread message

jh

unread,
Jun 16, 2009, 3:31:10 PM6/16/09
to
Greetings,

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

Larry W. Virden

unread,
Jun 17, 2009, 7:14:26 AM6/17/09
to
On Jun 16, 3:31 pm, jh <jvh75...@gmail.com> wrote:
> Greetings,
>
> 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.
>

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.

hae

unread,
Jun 17, 2009, 7:52:30 AM6/17/09
to

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

hae

unread,
Jun 17, 2009, 8:03:22 AM6/17/09
to

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

Arjen Markus

unread,
Jun 17, 2009, 8:36:11 AM6/17/09
to
> Ruediger- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

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

0 new messages