6

I am running an application and it throws me an error saying:

"C++ header 'string_view' is required. You need to install a newer libstdc++ on the host system."

Can someone guide me on what I need to do to get a newer version of "libstdc++" on my machine?

Thanks

LeaningAndroid
  • 445
  • 2
  • 4
  • 12
  • g++ version 7.x has like `gcc73/include/c++/7.3.0/string_view`. ... Earlier modern g++ versions (5.x ... 6 ) have the header `string_view` located in "experimental/" . .... https://stackoverflow.com/questions/47175706/how-to-install-gcc-4-9-2-on-rhel-7-4/47189915#47189915 – Knud Larsen Feb 10 '21 at 09:44

2 Answers2

2

Try running yum provides libstdc++ to show you what package provided the library on your system. You can then check if those packages are available for update using yum list available | grep <that package> followed by yum update <that package>.

micmoyles
  • 21
  • 2
0

Facing the same issue, I built gcc from source. This way you get to choose your own version. It's actually pretty straightforard -- see Building GCC at https://gcc.gnu.org/wiki/InstallingGCC.

TooTone
  • 7,129
  • 5
  • 34
  • 60