Hi Alan Good to hear your interest. It's always useful to be able to pass code around to get more than one person test it. As far as compilers go I use visual studio express. Windows has a number of faults when it comes to programming but the VS IDE and debugger really are fantastic and on its own VS is the reason why I use windows. Slightly off topic a friend emailed me this link http://xkcd.com/378/ which I think nicely sums up the case for a good IDE. Anyway on a similar vein to your details on MinGW I've attached instructions for setting up plplot using Visual Studio if you are interested in giving it a go. It's intended to be a full walkthrough so may be a bit on the basic side for you. They are also for VS 2008, the latest version 2012 is a bit different and I have yet to try building plplot or wxwidgets wth it. This will change very soon however so I can access the C++11 threading functions we discussed previously. My intention was to put this on the wiki, but I was waiting for feedback on a patch I submitted to set up static linked builds. I'll update the instructions for 2012 and put them on the wiki when I get chance. I will try to check the wingc driver this weekend to confirm your findings. Phil
________________________________ From: Alan W. Irwin <ir...@beluga.phys.uvic.ca> To: phil rosenberg <philip_rosenb...@yahoo.com>; PLplot development list <Plplot-devel@lists.sourceforge.net> Sent: Friday, 1 March 2013, 6:54 Subject: Notes on building the wxwidgets software package on MinGW/MSYS Hi Phil: This is mostly addressed to you because of your wxwidgets and Windows interests. I would like to help testing our wxwidgets device driver on Windows so today I built and tested the prerequisite software (wxWidgets-2.8.12) on MinGW-4.7.0/MSYS on the Wine version of Windows. The reason for these notes is primarily to help other PLplot developers building the wxWidgets software using MinGW to avoid the "could not read symbols: Memory exhausted" error message that you encounter unless you use a special gcc option. But you should be interested in the fact that MinGW/MSYS allows you to run the test_c_wxwidgets test target on Windows just like you do on Linux, and I got reasonably good results for that target for the current svn trunk version (with none of your changes applied yet). It turns out the combination of modern MinGW (4.6.0 or above) and wxWidgets is fairly toxic and therefore exhausts memory (with the above error message) unless you use a special gcc flag. See comments at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601 and the implementation (with MinGW-4.6.1, see http://mingw-users.1079350.n2.nabble.com/MinGW-GCC-4-6-1-released-td6795171.html) of the -fno-keep-inline-dllexport flag for the gcc and g++ compilers. Here is the bash(.exe) script I implemented to build and install wxWidgets. Note especially the definition of CXXFLAGS. N.B. WXWIDGETS_PREFIX_PATH and INSTALL_PREFIX must be defined carefully since this script removes them and all their subdirectories (!) without warning before populating those directory trees again by this script. I have implemented a set_msys_wxwidgets.sh script to set those and other necessary bash environment variables for the wxWidgets build script below, but I don't include that set_msys_wxwidgets.sh script here since everything in it points to special locations only appropriate to my own setup. ############## # Build and install wxwidgets with MinGW/MSYS. # It is assumed you have run the "source set_msys_wxwidgets.sh" command # to set up various PATHS before running this bash shell script. mkdir -p $WXWIDGETS_PREFIX_PATH/build_dir rm -rf $WXWIDGETS_PREFIX_PATH/build_dir/* $INSTALL_PREFIX # This flag required to solve memory exhaustion issue discussed in # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601 export CXXFLAGS="-fno-keep-inline-dllexport" cd $WXWIDGETS_PREFIX_PATH/build_dir $WXWIDGETS_SOURCE_DIR/configure --prefix=$INSTALL_PREFIX \ --enable-shared --enable-unicode \ --enable-debug --enable-debug_gdb \ >& configure.out make VERBOSE=1 -j4 all >& all.out make VERBOSE=1 -j4 install >& install.out ############## This script worked fine for MinGW-4.7.0/MSYS on Wine-1.5.19. There were no memory exhaustion issues (which occurred if I didn't specify export CXXFLAGS="-fno-keep-inline-dllexport"), and no obvious build or install issues. Furthermore, a simple run-time test of of a minimal wxwidgets example done as follows: # From the top of the build tree.... cd samples/minimal/ make # Put dll's on the PATH PATH=$INSTALL_PREFIX/lib/:$PATH ./minimal.exe .... appears to work fine on Wine. $WXWIDGETS_SOURCE_DIR points to a directory created by unpacking the compressed Unix tarball, wxWidgets-2.8.12.tar.gz so MinGW is happy with Unix line endings as in this case and also Windows line endings (which I already knew from other builds). Also, this was the first time I tried an autotools-based build under MinGW/MSYS in some time, and I was happy to see that still works for MinGW/MSYS even though I far prefer CMake-based build systems to autotools-based based build systems. I further tested this wxWidgets-2.8.12 installation by putting both $INSTALL_PREFIX/bin (so CMake can find wx-config for the PLplot configuration) and $INSTALL_PREFIX/lib on the PATH for a PLplot test using MinGW/MSYS on Wine. Here is the bash(.exe) build script I used to build PLplot and test the wxwidgets device for a subset of our C examples. N.B. PLPLOT_PREFIX_PATH and INSTALL_PREFIX must be defined carefully since this script removes them and all their subdirectories (!) without warning before populating those directory trees again by this script. I have implemented a set_msys_wxwidgets.sh script to set those and other necessary bash environment variables for the PLplot build script below, but I don't include set_msys_plplot.sh since everything in it points to special locations only appropriate to my own setup. ######## # Build and test PLplot with MinGW/MSYS under wine. # It is assumed you have run the "source set_msys_plplot.sh" command # to set up various PATHS before running this bash shell script. mkdir -p $PLPLOT_PREFIX_PATH/build_dir rm -rf $PLPLOT_PREFIX_PATH/build_dir/* $INSTALL_PREFIX cd $PLPLOT_PREFIX_PATH/build_dir export CFLAGS='-O3' MAKE_OPTIONS=-j4 # The Lua find module goes into an infinite loop for some reason # (at least on Wine). That will be investigated later, but # work around by explicitly disabling Lua for now. cmake -G 'MSYS Makefiles' \ "-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX" \ -DENABLE_lua=OFF -DBUILD_TEST=ON ${PLPLOT_SOURCE_DIR} >& cmake.out # The first make command fails with the test-drv-info.exe non-zero # return code issue discussed in my previous post. Until this # issue is solved, the workaround is simply to run the make command twice. make VERBOSE=1 $MAKE_OPTIONS test_c_wxwidgets >& make_test_wxwidgets.out make VERBOSE=1 $MAKE_OPTIONS test_c_wxwidgets >& make_test_wxwidgets.out1 ######## The test_c_wxwidgets test target runs a subset of the C examples for -dev wxwidgets. The results of the above test (which ran the basic version of the wxwidgets device for some reason rather than the wxGC version I have access to on Linux) had no obvious run-time errors like segfaults. There were some obvious rendering issues for some of the fills generated by PLplot (e.g., holes and other rendering artifacts in the example 16 plshades results). I ascribe those rendering issues to shaky graphics support for the Wine version of Windows (after all Wine has to implement the Windows graphics API as a wrapper for the extremely different and widely varied Linux graphics API) rather than some fundamental issue with wxwidgets on Windows. BTW, I also ran the test_c_wingcc target on Wine. For that case there was also no obvious run-time issues, but there were severe rendering issues (only the window frame was displayed with a plotting area inside that had no plotted lines or fills and which was completely transparent to whatever was underneath). I ascribe those rendering issues to shaky graphical support on Wine rather than something fundamentally wrong with the wingcc device. 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 __________________________
Building PLPLOT with Visual Studio.docx
Description: application/vnd.openxmlformats-officedocument.wordprocessingml.document
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel