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

Added more explicit mention of PKG_CXX_LIBS #62

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

Shians
Copy link

@Shians Shians commented Jan 15, 2025

Sorry for this rather stupid pull request, I recently debugged an issue for a colleague whose package would not build successfully due to missing symbols. It eventually turned out he was using PKG_C_LIBS instead of PKG_CXX_LIBS while including the H5Cpp.h header, thus failing to include the necessary libhdf5_cpp.a.

The purpose of this pull request is to make the option of PKG_CXX_LIBS more prominent, so that lazy readers like myself are more likely to catch it in the documentation. I think there are many like me that simply look at the code-formatted blocks and copy paste what we think we need without fully reading the rest of the text. These commands are also very arcane given they use bash, environment variables and relate to the C/C++ build system which not many R programmers are proficient with.

My preference would actually be to put PKG_CXX_LIBS first, as I would think most R developers would be using Rcpp to access lower level code. Therefore C++ is likely to be more relevant to most users.

Symbol issues in C/C++ compilation are just very difficult to debug, and make particularly so when R is in charge of the building commands. I would hope this pull request can help at least one other user avoid the pain I had to go through.

Added more explicit mention of PKG_CXX_LIBS
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.

None yet

1 participant