Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
636 views
in Technique[技术] by (71.8m points)

c++ - gnuplot-cpp cannot feed command to pipe

I'm using gnuplot-cpp to draw math graphs using C++. As I vaguely understand, this is an interface which feeds command to pgnuplot.exe and shows the output in another GUI.

So far, I've got the error like:

'C:Program' is not recognized as an internal or external command...

the original command of which fed to the pipe is:

"C:Program Files (x86)gnuplotin/pgnuplot.exe"

the same command executed in _access(cmd) returns TRUE for the existence of the executable whereas it returns the error described priorily when executed in _popen(cmd,"w");

I'm wondering the error comes from the cmd string format and I've tried "/", "", ""... but nothing works

the 2 code files are gnuplot_i.hpp and example.cc

Thank you in advance for any help!

Edit 01:

I've updated the two code files. They contain some of my supplementary edits

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is a known bug of gnuplot-cpp, see the issue Blanks in gnuplot path cause failure.

As workaround you can add the gnuplot directory to your PATH and call only pgnuplot.exe.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...