From: Arjen M. <arj...@wl...> - 2008-01-11 07:27:01
|
> On 2008-01-10 21:42+0100 Arjen Markus wrote: > >>>> On Tue, Jan 08, 2008 at 08:43:46AM +0100, Arjen Markus wrote: >> >>> >>> I tried to build PLplot for Tcl 8.4 under MingW (with the intent to >>> move on to Tcl 8.5 if all went well), just to see what would happen >>> (and to have access to the generated source code for inspection). >>> In previous attempts - with Cygwin at least - there was all manner of >>> problems, due to the incorrect indication of the particular platform. >>> >>> But with MingW building worked smoothly. I have not yet tested the >>> build yet, did not have time. But this is encouraging! >>> >> >> I have tried to get the examples working with Tcl (running pltcl) >> under Cygwin and MinGW. I had some limited success: >> >> 1. The PostScript device works fine > > Congratulations. I call that much more than limited success since > troubles > you had with -dev wingcc presumably have nothing to do with Tcl, and > would, > for example, also show up for the C examples. Thus, the successful tcl > example results with the PostScript device shows you now have the Tcl > interface to PLplot working properly on both MinGW and Cygwin, and I hope > you use your combination of Tcl and Windows skills to play further with > this > interface (and also -dev tk and the Tk examples) on those two platforms as > well as the bare windows platform. > Hi Alan, wise words indeed (see the - elliptical - subject line)! The short story: --------------- I have success now with Tcl under Cygwin and MinGW with the wingcc device. The long story: -------------- I thought about the possible causes and concluded that it was the way I was trying to run the examples: interactively. The Tcl-shell, pltcl, can be used interactively, that is, you simply type commands and that is what I did in order to find out what was going on. I had to add some print statements in the initialisation function because it would fail at first. But that brings the Tcl-shell into a very awkward position: - It reads commands from the command line - It also has to attend to the message loop to properly update the displayed window That is impossible for an non-threaded program under MS Windows. (Though it seems to happen nicely under UNIX and Linux - you can use the Tk-shell wish interactively). Anyway: apart from this interactive use, if I simply run "x01" (or any of the others) as a program, this problem disappears and I get the pictures I expect! Note: This is for the wingcc device under MinGW and Cygwin. (My earlier reported failure was for the Xwin device - I did not read the list of available devices and usually wingcc is number 1 ;). I do need to fiddle around with a few environment variables to get the programs to work, and I will document these on the Wiki but that is a very small prize for this new capability! I have not tried the bare Windows variant yet - I did not want to stretch my luck too far, but I may have time today to try that as well. Quick summary for the environment variables and files: ----------------------------------------------------- Cygwin: PATH should include /usr/X11R6/bin for the X11 library that is needed TCL_LIBRARY should be set explicitly: /usr/share/tcl8.4 MinGW: PL_LIBRARY should be set to the directory holding the file "plplot.tcl" Regards, Arjen |