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

Warnings when compiling on R 4.2 or lower #13

Open
mfansler opened this issue Dec 4, 2023 · 2 comments
Open

Warnings when compiling on R 4.2 or lower #13

mfansler opened this issue Dec 4, 2023 · 2 comments

Comments

@mfansler
Copy link

mfansler commented Dec 4, 2023

This package uses C++17 syntax, which is declared in the DESCRIPTION file. However, R does not use this information to control the C++ standard, but instead defaults to gnu++14 in R 4.2 and gnu++11 in R 4.1. This results in warnings about C++17 extensions during installation (e.g., see recent CRAN install log1).

These warnings could be avoided by explicitly setting CXX_STD=CXX17 in Makevars(.win) files.

This is just a minor suggestion (nothing urgent).


[1]: Unfortunately, this is not a persistent log. Specifically, there are two warning: decomposition declarations are a C++17 extension resulting from compiling compression.cpp with -std=gnu++14.

@elbersb
Copy link
Owner

elbersb commented Jan 30, 2024

Hi! Would a Makevars file in the src directory solve this? Or do I need a Makevars.win file as well?

@mfansler
Copy link
Author

Not sure if windows will use the generic one, so might need both.

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

No branches or pull requests

2 participants