Click here to Skip to main content
15,878,945 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to use gnuplot with C++. I'm using visual studio if that matters. All that I have done so far is write

#include <gnuplot-iostream.h>

and I'm already getting thousands of errors of many types from "too many arguments ..." to "can not redeclare ..." Has anyone worked with gnuplot? Any idea what would be causing this?


What I have tried:

I'm not sure what to try -- I haven't actually used gnuplot. By all appearences it is gnuplot itself that is broken. I did notice that visual studio initially was not finding some necessary header files (this related to Boost using <> where "" would have been better in its include statements) but I resolved that issue. I downloaded gnuplot from sourceforge here: gnuplot - Browse /gnuplot at SourceForge.net[^] [^] .
Posted
Updated 24-Feb-21 22:09pm
Comments
Shao Voon Wong 25-Feb-21 1:11am    
Did you add gnuplot's include path to the Visual Studio's directory? Right-click on the project (that use gnuplot) in the Solution Explorer, select Properties in the popup menu.

Configuration Properties -> VC++ Directories -> Include Directories

You have messed your code too much, so it is best to restart in a clean area. Maybe you have misconfigured the code or arent using the correct settings or compiler.

Read gnuplot homepage there you find the documentation and some example to learn how to use it correctly.
 
Share this answer
 
Quote:
Gnuplot seemingly very broken
Very unlikely.
Have a look at the instructions for building with Visual Studio (INSTALL file in the gnuplot sources).
 
Share this answer
 
Gnuplot is not broken, you have just missed something in your installation. See using gnuplot-iostream.h in C++ - Stack Overflow[^] and gnuplot-iostream.h - Google Search[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900