[vtkusers] Re: vtk, python20, TkRenderWidget, Win2000
Sebastien BARRE
seb-ml-a at barre.nom.fr
Wed Mar 7 12:47:29 EST 2001
At 07/03/01 12:06 -0500, David Gobbi wrote:
>In case you didn't catch my reply to Prabhu, the problem lies with
>the fact that graphics/vtkTkRenderWidget.cxx (and the other widgets)
>require header files that don't come with the binary distribution of
>tcl/tk.
I will just add this is neither VTK nor Python fault. This is definitely a
Tcl problem, I haven't understood why the binary distribs do not ship with
these necessary headers. This is an old persistent problem, I remember
having reported it since VTK 2.0 or before.
>Unfortunately pcmaker uses a fancy (and undocumented) set of rules for
>searching for the tcl/tk header files.
Yes, I'm responsible for that fancy set of rules :) I added them a long
time ago, because the previous behaviour prevented anyone to build VTK
against the Tcl binary distrib, which is not organized like the Tcl source
tree. I added these rules so that you will just have to specify the path to
the Tcl or Tk libs, and the 'include' directory will be computed
accordingly, no matter they come from self-compiled sources or pre-built
binaries. It works. The problem, as David stated, is that the Tcl binary
distrib does not ship with all headers.
The gory details are (pcmakerDlg.h) :
// Tcl/Tk development libs come in two flavors: sources or pre-built
binaries
// Sources =>
// libs : TCL_ROOT/win/Release/tcl**.lib
// TK_ROOT/win/Release/tk**.lib
// includes dirs : TCL_ROOT/win
// TCL_ROOT/generic
// TK_ROOT/win
// TK_ROOT/generic
// TK_ROOT/xlib
//
// Pre-built binaries =>
// libs : TCLTK_ROOT/lib/tcl**.lib
// TCLTK_ROOT/lib/tcl**.lib
// includes dirs : TCLTK_ROOT/include
//
// WARNING : as of tcl/tk 8.2, some include files are still missing :(
// Extract them from the source package, and put them in
TCLTK_ROOT/include :
// TK_ROOT/generic/tkInt.h
// TK_ROOT/generic/tkIntDecls.h
// TK_ROOT/generic/tkPlatDecls.h
// TK_ROOT/generic/tkIntPlatDecls.h
// TK_ROOT/win/tkWin.h
// TK_ROOT/win/tkWinInt.h
// TK_ROOT/win/tkPort.h
// TCL_ROOT/generic/tclInt.h
// TCL_ROOT/generic/tclIntDecls.h
// Let's update TclRoot and TkRoot so that they match TCL_ROOT / TK_ROOT or
// both TCLTK_ROOT.
//
// Then use them to add the following INCLUDE path :
// /I TkRoot/win /I TkRoot/xblib /I TkRoot/generic
// /I TclRoot/win /I TclRoot/generic
// /I TclRoot/include
>then it adds the following include directories to the build (I was
>told this recently by Sebastien, but pcmaker has been doing this
>for years)
>
>"C:\Program Files\Tcl\include"
>"C:\Program Files\Tcl\xlib"
>"C:\Program Files\Tcl\win"
>"C:\Program Files\Tcl\generic"
>
>but the 'xlib', 'win', and 'generic' directories are only present
>in the source distribution of tcl/tk.
Oh yes, I see the "problem" : I kept these directories (xlib, win, generic)
because of laziness, sorry :), but it does not matter if they are present
or not, the only important include dir is : "C:\Program Files\Tcl\include",
where all your headers "should" be. I should remove xlib, win, generic in
that case.
>So,
>what I do is copy these directories to my binary Tcl distribution.
Yes indeed, you can do that, as a side effect of the previous problem :)
Interesting. But the correct solution would be : put the include files in
the "C:\Program Files\Tcl\include" directory, really.
>1) a big, fat README.TXT should be added to the pcmaker directory that
> tells people in gory detail how to build against a specific
> tcl/tk distribution
Yes.
>2) the tcl/tk libs included with VTK should be updated to 8.3, so that
> VTK can be built against Python-2.0 with no hassle (at least until
> Python switches to a different Tcl/Tk version...).
Oh yes. 8.3. We need that.
More information about the vtkusers
mailing list