in the octave prompt, I see that it's *not* defined.
Michael, I don't know if this is relevant, but on my system, I tried the _popen example on MSDN and no matter what I do, it fails: it returns a null FILE*. And popen calls _popen... On the other hand, popen2 does not fail (it doesn't work, but it doesn't return a null pointer), and if I'm not mistaken, it takes a different route.
On the MSDN, I tried the _pipe example which does a similar job by via _pipe, dup, dup2 (I don't recall if they have underscores) and spawnvp and that example works. Does this tell you anything?
----- Original Message ----
From: Michael Goffioul <address@hidden>
To: N. B. <address@hidden>
Cc: address@hidden
Sent: Monday, December 17, 2007 4:59:38 PM
Subject: Re: problem with gnuplot and octave, 2.9.19, MSVC build on windows XP
On 12/17/07, N. B. <
address@hidden> wrote:
>
> I tried just a tad bit more. Maybe it doesn't make any sense, I don't
know,
> but I tried popen2 instead of popen. Still it doesn't work, but it
fails
> silently and the handle is not -1. On the other hand experimenting
with the
> scripts, I stumbled on yet something else. There is a code in
> __gnuplot_version__.m:
> [status, output] = system (sprintf ("%s --version", gnuplot_binary
()));
> This seems to work under linux (Fedora 8, octave 2.9.15), but in
windows, it
> gives an error:
>
> octave:1> [status, output] = system (sprintf ("%s --version",
gnuplot_binary
> ()));
> error: value on right hand side of assignment is undefined
> error: evaluating assignment _expression_ near line 1, column 19
So, if I understand correctly, sytem("pgnuplot") works OK, but not the
code above, right? What does gnuplot_binary returns? Do you have
the DISPLAY variable defined?
Michael.