Hi Alan Sorry this has taken me a while to look at. I just want to check what you think the behaviour should be id shapelib is off, deprecated is on and the user passes in a map name other than one of the ones we supply? The behaviour before we began using shapefiles was the same as it is now: If a file with that name existed then plplot attempted to read it, if not then plplot reported the warning you saw. I think that is still correct behaviour. What should probably happen is that the final page of the example should not be drawn unless shapelib support is on. To do this we need either a compile time or runtime check for whether plplot was built with shapelib support. Not wanting to touch the public API I guess a #define PL_USE_SHAPEFILES in plConfig.h is required. However I'm not sure how to do that. I tried adding
set(PL_USE_SHAPEFILES, TRUE) In shapelib.cmake and #cmakedefine PL_USE_SHAPEFILES in plConfig.h.in, but this doesn't work. You might have to look at this to get it to work or give me some idea what I am doing wrong. I suspect that shapelib.cmake is not called until after plConfig.h is generated. If so then sorting that would be a significant change to the build system that is beyond my skill. Phil On 1 December 2015 at 09:46, Phil Rosenberg <p.d.rosenb...@gmail.com> wrote: > Hi Alan I'll look at this today > ________________________________ > From: Alan W. Irwin > Sent: 30/11/2015 21:30 > To: Phil Rosenberg; Peter Williams > Cc: PLplot development list > Subject: Re: [Plplot-devel] Plplot Source Error > > On 2015-11-30 19:39-0000 Peter Williams wrote: > >> I have done a plplot build using cmake with the 'deprecated' flag set >> on. The mingw make comes with an error message: >> >> C:\PlplotSource-5.11.1\src\plmap.c: In function 'drawmap': >> >> C:\PlplotSource-5.11.1\src\plmap.c:530:25: error: 'appendresult' >> undeclared (first use in this function) >> appendresult += appendfltptr( &splitx, nsplitsections, bufx + i ); >> ^ >> I do not get this error with the deprecated flag set off. It seems a >> simple error to correct (merely initialise appendresult =0) >> but I am loath to tamper with complex code which is not mine. > > To Phil and Peter: > > I confirm this issue on Linux if I use the combination of cmake options > -DPL_DEPRECATED=ON -DHAVE_SHAPELIB=OFF. > > As expected, this build issue does go away if the appendresult declaration > and > initialization is moved to where it will be compiled in general. > However, that is not all the story, because if you also compile > example 19 for that case and any device driver (I chose cairo), then > there is a long series of warnings issued for that example when > you run it, e.g., with > > examples/c/x19c -dev xcairo > > Those warning messages start with > > *** PLPLOT WARNING *** > Could not find ss/ss64ne_Landform_Area.map file. > > That makes no sense. If -DHAVE_SHAPELIB=OFF why in the world > should this example (or more likely the core library) be looking for > shapelib files? I also tested the case where -DPL_DEPRECATED=OFF > -DHAVE_SHAPELIB=OFF, and the code does the right thing there > which is emit the following warning > > *** PLPLOT WARNING *** > Use of the old plplot map file format is deprecated. > It is recommended that the shapelib library be used to provide map > support. > > @Phil: As original author of this code, would you please fix the > -DPL_DEPRECATED=ON -DHAVE_SHAPELIB=OFF case so that the first pages of > example 19 come out right (like they do now) using the deprecated way > of doing things, but the last page should simply emit the same message > as for the -DPL_DEPRECATED=OFF -DHAVE_SHAPELIB=OFF case, i.e., the > last WARNING message above? > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state > implementation for stellar interiors (freeeos.sf.net); the Time > Ephemerides project (timeephem.sf.net); PLplot scientific plotting > software package (plplot.sf.net); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); > and the Linux Brochure Project (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel