Hi Alan, Phil > and the old (-DOLD_WXWIDGETS=ON) -dev wxwidgets, and in each case the > requested blue background was rendered correctly.
I tried to reproduce this (-DOLD_WXWIDGETS=ON) in Windows , Visual Studio 2015, and I do get the blue backround but in the process of doing this I found another bug When you try to do the build with -DOLD_WXWIDGETS=ON (and only with this option, in Windows) I get a linking error plplot.lib(deprecated_wxwidgets_app.obj) : error LNK2019: unresolved external symbol "int __cdecl plsnprintf(char *,int,char const *,...)" referenced in function "public: bool __thiscall wxPLplotFrame::SavePlot(char const *,char const *,int,int)" wxPLplotFrame::SavePlot does include this call snprintf( buf, 512, "File %s couldn't be saved", filename ); and snprintf is defined as #else // !PL_HAVE_SNPRINTF // declare dummy functions which just call the unsafe // functions ignoring the size of the string int plsnprintf( char *buffer, int n, const char *format, ... ); int plsnscanf( const char *buffer, int n, const char *format, ... ); #define snprintf plsnprintf but this makes no sense to me because plsnprintf is defined in plctrl.c that is part of the library int plsnprintf( char *buffer, int n, const char *format, ... ) { either way, this should not fall in the case of !PL_HAVE_SNPRINTF because Visual Studio does defines _snprintf so the fix is to manually define #ifndef PL_HAVE_SNPRINTF #define PL_HAVE_SNPRINTF #endif so, the bug is that cmake does not detect _snprintf correctly, maybe in this code check_function_exists(snprintf PL_HAVE_SNPRINTF) if(NOT PL_HAVE_SNPRINTF) check_function_exists(_snprintf _PL_HAVE_SNPRINTF) set(PL_HAVE_SNPRINTF ${_PL_HAVE_SNPRINTF} CACHE INTERNAL "Have function _sprintf") endif(NOT PL_HAVE_SNPRINTF) I used in cmake cmake ".." -G "Visual Studio 14" -DPL_DOUBLE:BOOL=ON -DBUILD_TEST:BOOL=ON -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMA KE_BUILD_TYPE:STRING="Debug" -DBUILD_SHARED_LIBS:BOOL=OFF -DSTATIC_RUNTIME:BOOL=ON -DPLD_wxwidgets:BOOL=ON -DwxWidgets_ROOT_DIR:PATH=%WXWIN% -DwxWidgets_LIB_ DIR:PATH=%WXWIN%\lib\vc_lib -DwxWidgets_CONFIGURATION=mswud -DENABLE_MIX_CXX=ON -DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF -DOLD_WXWIDGETS=ON I also do get some unrelated errors , but that's a separate bug the thing is that cmake has somewhere hardcoded Unix commands like Generating announce-plplot-5.3.0.html 'xmlto' is not recognized as an internal or external command, Generating staging/htdocs/announce/ChangeLog-5.2.1-5.3.0 'cp' is not recognized as an internal or external command, 'grep' is not recognized as an internal or external command, 'env' is not recognized as an internal or external command, and this causes some projects to not build by the way this is not related to the -DOLD_WXWIDGETS=ON it also happens in another builds -Pedro ----- Original Message ----- From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca> To: "Phil Rosenberg" <p.d.rosenb...@gmail.com> Cc: "PLplot development list" <Plplot-devel@lists.sourceforge.net> Sent: Saturday, October 08, 2016 12:55 PM Subject: [Plplot-devel] New wxwidgets device does not honor -bg > On 2016-10-06 00:13-0700 Alan W. Irwin wrote: > >> @Phil, will you look into this please? >> >> To verify this bug myself, I did the following steps which you should >> be able to replicate for yourself. >> >> * Run cmake with the -DBUILD_TEST=ON option which configures >> the build of our standard examples. >> >> * Build a standard example (the 00 standard example in C in this case, >> but any other standard example will likely also demonstrate this bug). >> >> make x00c >> >> * Build several different devices to try. >> >> make svg >> make xwin >> make wxwidgets wxPLViewer #wxwidgets interacts with wxPLViewer at run >> time so both have to be built >> >> * Run the 00 standard example with different devices and with a blue >> background specified. (The -bg option is the same as calling plscolbg >> before plinit in the standard example, and the -bg colour is specified >> with the standard RRGGBB hexadecimal notation so 0000FF is saturated >> blue) >> >> examples/c/x00c -dev svg -bg 0000FF -o test.svg >> examples/c/x00c -dev xwin -bg 0000FF >> examples/c/x00c -dev wxwidgets -bg 0000FF >> >> I found that the svg and xwin results had the specified blue >> background, but the wxPLViewer instance that was automatically >> launched and communicated with by -dev wxwidgets rendered the >> background as the default black rather than the specified blue ==> >> BUG. I don't know if that is a bug in -dev wxwidgets, a bug in the >> way background colours are communicated to the wxPLViewer instance, >> and/or a bug in the wxPLViewer code, but I assume you will be readily >> able to figure this out from your knowledge of each of these >> components of our wxwidgets-related code. >> >> To my mind, the highest priority is to get -dev wxwidgets to work >> properly with -bg as requested above, but as a much lower priority it >> would be good to build most of the standard PLplot command-line >> parsing (likely mostly everything other than -dev and -o) into >> examples/c++/wxPLplotDemo.cpp so that it would be possible, for >> example to run >> >> examples/c++/wxPLplotDemo -bg 0000FF -geometry -geometry 500x1000 >> >> and get the specified blue background and geometry for that example. >> >> Just to remind you and others here, please run, e.g., >> >> examples/c/x00c -h >> >> to get help on all the PLplot options that can be parsed from the >> command line. > > Hi Phil: > > I am switching further discussion of the -bg results for wxwidgets to > plplot-devel. > > I haven't heard back from you yet concerning the new wxwidgets device > test results with -bg that I reported above on plplot-general. > Meanwhile, I have tried the same test with -dev xcairo, -dev qtwidget, > and the old (-DOLD_WXWIDGETS=ON) -dev wxwidgets, and in each case the > requested blue background was rendered correctly. So from the tests > above and these further tests I am virtually certain that every PLplot > device other than the new wxwidgets device honors the -bg option. And > for this reason, I view this deficiency of the new wxwidgets device as > a bug which I hope you are willing to fix. > > 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 > __________________________ > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Plplot-devel mailing list > Plplot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/plplot-devel > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel