'gnuplot iostream error "The code executionc annot proceed because boost_iostream.. was not found"

I am attempting to use gnuplot-iostream to run the following code:

#include <iostream>
#include <vector>
#include <random>
#include <numeric>

#include "gnuplot-iostream.h"

int main() {
    Gnuplot gp("\"C:\\Program Files\\gnuplot\\bin\\gnuplot.exe\"");

    std::random_device rd;
    std::mt19937 mt(rd());
    std::normal_distribution<double> normdist(0., 1.);

    std::vector<double> v0, v1;
    for (int i = 0; i < 1000; i++) {
        v0.push_back(normdist(mt));
        v1.push_back(normdist(mt));
    }
    std::partial_sum(v0.begin(), v0.end(), v0.begin());
    std::partial_sum(v1.begin(), v1.end(), v1.begin());

    gp << "set title 'graph of two random lines'\n";
    gp << "plot '-' with lines title v0,"
        << "'-' with lins title 'v1'\n";
    gp.send(v0);
    gp.send(v1);

    std::cin.get();
}

This code produces the following error: enter image description here

I am currently running the program in c++17 and there are 0 errors in the gnuplot-iostream header. I am unsure of the problem. I have reinstalled the program with no success. Thank you!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source