On 2008-01-18 19:51+0100 Torquil Macdonald S�rensen wrote:

Hi Torquil:

Thanks for giving a simple example of the issue you have discovered.  I made
some minimal changes to your code so it worked for C, and could not confirm
the issue for that case.

However, I did confirm there is an issue for the C++ case.

I made the following changes to your test C++ code so that it had the same
#include as our current set of C++ examples and also had the ability to
parse the command line (to give a convenient choice of device drivers).

--- test.cc_old 2008-01-18 13:39:56.000000000 -0800
+++ test.cc     2008-01-18 13:38:52.000000000 -0800
@@ -1,12 +1,14 @@
-#include <plplot/plplot.h>
+#include "plc++demos.h"

+#ifdef USE_NAMESPACE
 using namespace std;
+#endif

-int main() {
+int main(int argc, const char *argv[]) {
         double x[] = { 0.1, 0.5, 0.2, 0.4, 0.4 };
         double y[] = { 0.5, 0.4, 0.4, 0.8, 0.9 };

-        plsdev("wxwidgets");
+        plparseopts(&argc, argv, PL_PARSE_FULL);
         plinit();
         plenv(0, 1, 0, 1, 1, -2);

For that minimally patched version I confirm the issue for Linux (Debian
testing).

OTOH, Example x10.cc does not show this problem.  Could somebody who is more
experienced than me with C++ gradually change over the above test code to
the same style as example 10 to see what C++ example style change exposes
this initialization issue?

Once we have determined that, then we will be in a better position to solve
the issue (or make recommendations about what C++ application style to
avoid).

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); PLplot scientific plotting software
package (plplot.org); 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
__________________________

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to