Undefined reference to `std::chrono::_V2::system_clock::now()' when linking with gfortran
问题 I am trying to create an user defined block in INSEL which requires C++ to program and I link it using gfortran. I have the following code in my program // Setting seed for random number generators unsigned seed = static_cast<int> (std::chrono::system_clock::now().time_since_epoch().count()); to set as a seed to my random number generator. When i compile it using g++ (gcc v.5.1.0) it shows no error or warning. My compiling command is g++ -O0 -Wall -c -g3 -std=c++14 -fmessage-length=0 $