From: Alan W. I. <ir...@be...> - 2002-07-10 19:20:41
|
On Wed, 10 Jul 2002, Vince Darley wrote: > I'm away from my machine at the moment, but just rename all instances of > that function in Plplotter_Init.c and you should be ok. I did this locally, but you probably wouldn't like my name (;-) so please commit your solution to the nameclash when you have time. With this change and adding -I/usr/include/tcl8.3/tk-private/generic/ -DHAVE_LIMITS_H -I/usr/include/tcl8.3/tcl-private/generic/ by hand to the plplotter.c compile line, I finally got a good Linux build! Now on to the executable testing. I get a segfault if I try ./x01c -dev tkwin Further debugging with the aid of valgrind showed the following problem right before the segfault. #2 0x4029e2c1 in plD_open_tkwin (pls=0x402bb040) at tkwin.c:427 427 tkwd->map = Tk_Colormap(pls->plPlotterPtr->tkwin); (gdb) p pls->plPlotterPtr $1 = (struct PlPlotter *) 0x0 (gdb) p pls->plPlotterPtr->tkwin Cannot access memory at address 0x0 However, further reading of your code comments indicates this driver is only supposed to work in a tk environment so I guess I deserved what I got....;-) So two quick questions/comments: (1) Please put in a quick test in tkwin.c that you *are* in a tk environment so you get an error message and smooth exit (rather than segfault) when you try this outside tk, e.g., with x01c. (2) How do I test the tkwin driver in a tk environment? (Complete cookbook please since I have very little knowledge of tcl/tk). Alan |