# TString.h Comilation errors due to C++ version despite ROOT having been compiled with correct version

**URL:** <https://root-forum.cern.ch/t/tstring-h-comilation-errors-due-to-c-version-despite-root-having-been-compiled-with-correct-version/46995>\
**Category:** ROOT\
**Tags:** cmake\
**Created:** [September 25, 2021, 6:48pm UTC](https://root-forum.cern.ch/t/tstring-h-comilation-errors-due-to-c-version-despite-root-having-been-compiled-with-correct-version/46995 "2021-09-25T18:48:23Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [September 26, 2021, 8:58am UTC](https://root-forum.cern.ch/t/tstring-h-comilation-errors-due-to-c-version-despite-root-having-been-compiled-with-correct-version/46995/4 "2021-09-26T08:58:54Z")

</div>

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/tstring-h-comilation-errors-due-to-c-version-despite-root-having-been-compiled-with-correct-version/46995)._
