I’m trying to compile a c++ program that I got from someone else. It’s been developed on windows and g++ is giving some compile errors. One of them is with
#include <random>
Which gives the following error: CandidateSolution.cpp:2:18: error: random: No such file or directory. I tried to find where I can get the error.h file from but I can’t find it. How can I get this to work?
That header is new to C++11. Try using
-std=c++11or-std=c++0x. Also, make sure your compiler is up to date.