# ‘string\_view’ is not a member of ‘std’ error. c++ version error?

**URL:** <https://root-forum.cern.ch/t/string-view-is-not-a-member-of-std-error-c-version-error/47713>\
**Category:** Newbie\
**Created:** [November 17, 2021, 9:57pm UTC](https://root-forum.cern.ch/t/string-view-is-not-a-member-of-std-error-c-version-error/47713 "2021-11-17T21:57:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 18, 2021, 7:59am UTC](https://root-forum.cern.ch/t/string-view-is-not-a-member-of-std-error-c-version-error/47713/2 "2021-11-18T07:59:22Z")

</div>

> [@Installation of a software dependent on root](https://root-forum.cern.ch/t/installation-of-a-software-dependent-on-root/46111/2):
>
> I guess there is a mismatch in the C++ language standard used by different libraries (i.e. GammaCombo and ROOT). You need to make sure that the same “-std=...” C++ compiler flag is used when building all your software. One of the first flags in the output of “root-config --cflags” is " -std=..." (and this tells you what C++ language standard your ROOT binaries were built with). Looking at your first screenshot, I can see “HAS\_CPP17 - Success”. This may suggest that the GammaCombo is using “-s…

> [@TString.h Comilation errors due to C++ version despite ROOT having been compiled with correct version](https://root-forum.cern.ch/t/tstring-h-comilation-errors-due-to-c-version-despite-root-having-been-compiled-with-correct-version/46995/4):
>
> It could be that your “some code” needs some special flag. It could also be that it does not support “c++17” at all (e.g., it supports at most “c++14” or “c++11”). For example, newer Geant 4 supports (note also “=14”): cmake -DGEANT4\_BUILD\_CXXSTD=14 Older Geant 4 supports (note also “=c++11”): cmake -DGEANT4\_BUILD\_CXXSTD=c++11

---

_[View the full topic](https://root-forum.cern.ch/t/string-view-is-not-a-member-of-std-error-c-version-error/47713)._
