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

fix c++11 detection on older gcc #47

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Conversation

skrap
Copy link
Contributor

@skrap skrap commented Oct 17, 2024

On older GCC, the c++11 detection fails, as GCC refuses to compile for the C language with the -std=c++11 flag.

The error is below:

  cc1: error: command line option '-std=c++11' is valid for C++/ObjC++ but not for C [-Werror]
  cc1: all warnings being treated as errors

This failure is interpreted as a lack of -std=c++11 support, and eventually the build fails because of the absence of that flag.

I propose this fix: tell cc that we're compiling with c++ instead. This means, in practice, that we will use g++ rather than gcc.

@jean-airoldie
Copy link
Owner

Sounds good. I'll do a release after I merge.

@jean-airoldie jean-airoldie merged commit e7ff467 into jean-airoldie:master Oct 17, 2024
10 checks passed
@skrap
Copy link
Contributor Author

skrap commented Oct 17, 2024

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants