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

Rcpp exports duplicated #408

Closed
johnlaing opened this issue Mar 12, 2025 · 4 comments
Closed

Rcpp exports duplicated #408

johnlaing opened this issue Mar 12, 2025 · 4 comments

Comments

@johnlaing
Copy link
Contributor

To resolve #405 we now define every exported C++ function twice. This is fine because preprocessing, but we should only Rcpp::export each function once - else a call to compileAttributes() results in duplicate export entries.

@eddelbuettel
Copy link
Member

eddelbuettel commented Mar 12, 2025

Nice catch. It so happens that I have a fix (I think) as part of another cleanup / rearrangement of the conditional compilation at also makes it easier to follow it. I can commit, but I was waiting for you to (if at all possible) get to PR #404 first?

@johnlaing
Copy link
Contributor Author

I was looking at #404 when I stumbled across this. The fix is trivial (drop the extra exports tags!) and I will submit PR shortly.

@eddelbuettel
Copy link
Member

We can do it the other way around too: I could clean this up, and we rebase #404 afterwards.

The basic idea of what I have tested is to

  • pass one overall 'yes/no' from configure to the Makefile and have the Makefile simplified as it can then have if/else
  • with that if becomes easy to define this in terms of a 'yes/no' variable that is flipped to 'yes'
  • and have compilation of parts interfacing blp on for the yes

But if you want you could write a PR now too I suppose under the existing structure and have the #if !defined(...) inside the function. Thinko of mine to not have done so when the stanza where I used this before does it too -- and likely for the same reason!

@eddelbuettel
Copy link
Member

This has been taken care of in #409

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