[GRASS5] NVIZ Tk8.0 on Debian

Glynn Clements glynn.clements at virgin.net
Wed May 8 22:39:00 EDT 2002


Tom Rake wrote:

> I did this in togl.c; for the 8.0.5 case
> 
> #include "tkInt8.0.5.h"
> 
> I added a sym link to tkInt.h in /usr/include/tk8.0/generic
> 
> Did a recompile with no errors and ran NVIZ without error.
> 
> I conclude that tkInt8.0p2.h is not compatable with tk.h from the 8.0.5 
> version that I got from debian.

If there's an incompatibility, it's with libtk.so not tk.h.

> Thus yet another header needs to be added to 
> get this to compile out of the box or maybe I am still missing the configure 
> option to get this right.

This can't be solved by specifying configure options.

NVIZ creates a new Tk widget class (an OpenGL canvas). Creating new Tk
widget classes involves accessing "internal" Tk structures, which are
defined in tkInt.h. There are two problems associated with this:

1. Most binary Tk distributions do not provide the tkInt.h file.

2. The structures which are defined in tkInt.h may change between
minor versions of Tk, so you need a version of tkInt.h which
corresponds to your particular version of libtk.so.

Due to point 1, we deal with point 2 by including lots of different
versions of tkInt.h, and togl.c includes the correct one according to
the version macros from tk.h. Except that it uses tkInt8.0p2.h for all
of the Tk 8.0 patch levels (NB: "8.0.5" is "8.0p5" in the offical Tk
numbering scheme).

If you send me the tkInt.h for 8.0p5, I'll add it to NVIZ' collection
of tkInt.h files.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list