package require/pkgIndex.tcl

Dr. Jasjit Suri jsuri at
Tue Sep 14 15:36:07 EDT 1999


I hope some body can please help me with this.
I created a sample.tcl file and i want to call vtk
using the command
"package require Vtk"

I did the following steps:

step 1:
created a dir say:

step 2:
made a dir called lib in:
    load all *.so files in that.
    These .so files came after compiling the VTK.

step 3:
made a file pkgIndex.tcl
    in the same dir
    and added the following line:

    package ifneeded Vtk 2.3  [list source [file join $dir vtk.tcl]]

step 4:
create a file called vtk.tcl (called by pkgIndex.tcl)
 and added the following lines:

package require License

namespace eval ::vtk {
    namespace export *
    variable library [file dirname [info script]]
    variable version 2.3

load [file join $vtk::library lib]
lappend auto_path [file join $vtk::library scripts]
package provide Vtk $vtk::version

step 5:

In the file sample.tcl (present any where) i did the following:
exec  itkwish3.0 "$0""$@"
catch {load vtktcl}

package require Iwidgets 3.0
lappend auto_path /local/lib
lappend auto_path $HOME/VTK811_new/vtk/vtk2.3

When I ran to see the results of sample.tcl,

it says: cannot load

Error in startup script: couldn't load file
dlopen: Unresolved symbols

I checked my LDLIB_PATH and i did include the path
where the .so were present.

Do you know which .so should be included
in the line

load [file join $vtk::library lib] ????

This line is being called by vtk.tcl which in turn is being
called by pkgIndex.tcl .

Thanks a lot for your help.



This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.

More information about the vtkusers mailing list