Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully error out if application compiling against ROOT is using a different C++ standard than the one with which ROOT was built #8063

Closed
eguiraud opened this issue Apr 30, 2021 · 2 comments · Fixed by #10517

Comments

@eguiraud
Copy link
Member

A very common source of confusion for users is compilation errors coming from ROOT when the C++ standard they use to compile their application is different from the C++ standard with which ROOT was compiled. Some examples:

It would be nice if we could catch this case in a frequently-included header or similar and provide a human-friendly error message instead.

@Axel-Naumann
Copy link
Member

We might not need a general version compat check - but we absolutely need it for our backports - i.e. checking whether the selection "libstd vs backport" is identical for ROOT's configuration time and user code include.

@andriish
Copy link
Contributor

andriish commented May 6, 2021

Related to #7644

jalopezg-git added a commit to jalopezg-git/root that referenced this issue May 3, 2022
Building external applications that use ROOT oftentimes fail if there
is a mismatch in the C++ standard between ROOT and the application.

To make this visible, diagnose if there is a mismatch in the value of
the `__cplusplus` macro w.r.t. when ROOT was configured.
The check is performed in `RConfigure.h`, a common header also included
in backports, e.g. RStringView.hxx.

Fixes root-project#8063.
jalopezg-git added a commit to jalopezg-git/root that referenced this issue May 3, 2022
Building external applications that use ROOT oftentimes fail if there
is a mismatch in the C++ standard between ROOT and the application.

To make this visible, diagnose if there is a mismatch in the value of
the `__cplusplus` macro w.r.t. when ROOT was configured.
The check is performed in `RConfigure.h`, a common header also included
in backports, e.g. RStringView.hxx.

Fixes root-project#8063.
jalopezg-git added a commit to jalopezg-git/root that referenced this issue May 3, 2022
Building external applications that use ROOT oftentimes fail if there
is a mismatch in the C++ standard between ROOT and the application.

To make this visible, diagnose if there is a mismatch in the value of
the `__cplusplus` macro w.r.t. when ROOT was configured.
The check is performed in `RConfigure.h`, a common header also included
in backports, e.g. RStringView.hxx.

Fixes root-project#8063.
jalopezg-git added a commit that referenced this issue May 4, 2022
Building external applications that use ROOT oftentimes fail if there
is a mismatch in the C++ standard between ROOT and the application.

To make this visible, diagnose if there is a mismatch in the value of
the `__cplusplus` macro w.r.t. when ROOT was configured.
The check is performed in `RConfigure.h`, a common header also included
in backports, e.g. RStringView.hxx.

Fixes #8063.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants