Added more explicit mention of PKG_CXX_LIBS #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ofPKG_CXX_LIBS
while including theH5Cpp.h
header, thus failing to include the necessarylibhdf5_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.