[vtkusers] Tcl wrapping for vtkMy (fwd)
Sebastien BARRE
sebastien.barre at kitware.com
Wed Mar 13 18:01:12 EST 2002
At 3/13/2002 05:32 PM, Sylvain Jaume wrote:
>Hi Sebastien,
>
> > First of all, which VTK version are you using ?
> > If it's the CVS, I'd advise you to update the vtkMy directory in
> Examples/,
> > since I fixed a couple of issues last week (not very important but who
> > knows :).
>
>I've just updated CMake and VTK 4.0. I re-built vtkMy, but it doesn't work
>either.
I guess you mean VTK CVS (i.e. VTK 4.1.1 :) and CMake CVS (i.e. 1.3) :)
> > I'd definitely check that:
> > a) the vtkmyCommonTCL shared lib has been built ). BUILD_SHARED_LIBS
> > must be ON.
>
>Previously I compiled VTK 4.0 with BUILD_SHARED_LIBS OFF and all classes
>were wrapped into Tcl. Why should it be different with vtkMy?
Simple :) As far as I remember, when BUILD_SHARED_LIBS is OFF, no shared
lib is created but the vtk.exe binary embed the corresponding static libs.
It means that you cannot load any Tcl shared libs, but you can use vtk.exe
as a Tcl interpreter and it will work just fine, giving you full access to
the VTK API.
There is no such support for a vtkmy.exe executable in vtkMy. Hence, you
should set BUILD_SHARED_LIBS to ON (thanks for the feedback, I'll issue a
warning in case it's OFF). You do *not* have to set it to ON for VTK, but
in that case, you have to use vtk.exe as a Tcl interpreter.
>Anyway I re-compiled vtkMy with BUILD_SHARED_LIBS ON. In ~/VTKMYBIN/lib,
>I've now:
>libvtkmyCommon.so* libvtkmyImaging.so* libvtkmyUnsorted.so*
>libvtkmyCommonTCL.so* libvtkmyImagingTCL.so* libvtkmyUnsortedTCL.so*
Good.
> > b) the path to this lib is in your PATH env var (which looks good from
> > what I can tell above)
> > try from tclsh: puts $env(PATH)
>
>Among other lines, I get:
>
>/home/jaume/VTKMYBIN/lib:/home/jaume/VTKMYBIN/bin:/home/jaume/VTKBIN/bin:/bin
OK
> > c) you can load it manually. Try from tclsh: load vtkmyCommonTCL (or
> > vtkmyCommonTCL.DLL or vtkmyCommonTCL.so)
>
>% load vtkmyCommonTCL
>couldn't load file "vtkmyCommonTCL": vtkmyCommonTCL.so: cannot open shared
>object file: No such file or directory
>
>but...
>
>% load libvtkmyCommonTCL
>
>works fine.
Ooops yes, sorry, I forgot about the Unix "lib" prefix. No pb, you did fine.
It means that Tcl can load the shared lib. And it means that it's in your path.
So what happens now if you just do a
package require vtkmy ?
It should work at this point...
>I set VTKMYBIN/lib in my PATH, not in my LD_LIBRARY_PATH
>Is it the way it should be?
Does it work without modifying LD_LIBRARY_PATH ?
>But I'd like to just type 'package require vtkmy' and not:
>% load libvtkmyCommonTCL
>% load libvtkmyUnsortedTCL
>% load libvtkmyImagingTCL
If course you do :)
>Currently I get 'can't find package vtkmy' when I type 'package require
>vtkmy'.
Again ? That's a different message, related to the TCL_LIB_PATH stuff (but
you did it right in your previous email, so what happened ?)
Seb
--
Sebastien Barre
More information about the vtkusers
mailing list