|
From: Arjen M. <arj...@wl...> - 2003-08-20 10:39:30
|
Hello, I started using PLplot in an existing program (emulating another graphical library). I had a few problems, some of which were rather tricky to solve, but it is working: - The program has a graphical user-interface that manages all the windows including the ones holding the graphics. Because plotting occurs in a pixmap, rather than directly into a window, I needed a routine like plswin() that would store the pixmap (the initialisation routines in the X window driver assume that they have a true window). I could solve this with some minor changes to the code - I needed a routine to turn clipping on and off (easy enough, so I added that to my copy) - I had severe problems getting the X Window driver to work properly (and later to get the PostScript driver to work properly). The cause was (apparently) the use of the global variable "plsc" in plP_setpxl() and plP_setphy() - the address was different when the routines were called from within the shared library than the one I found via the debugger in the static library. When I made clones of these two routines and passed the argument "pls" directly, the problem was gone. I am not familiar enough with the linking process to be much more clear about this, but apparently there were _two_ copies of (at least) the global variable plsc around. Because the program contains Fortran sources as well, I used a Fortran compiler and linker to create the final executable. Kind regards, Arjen Markus |