-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
cppFunction won't compile #1017
Comments
Oh, I see now. At least you have a bug. Maybe. I think what you are hitting is not related to how the A counterexample is R> Rcpp::cppFunction('arma::mat timesThree(arma::mat x) {return x * 3.0;}', depends = c("RcppArmadillo","BH"))
R> timesThree(matrix(c(1,7,14),3))
[,1]
[1,] 3
[2,] 21
[3,] 42
R> |
I think it's more fundamental thatn that. If you run with the
|
I looked at But finally: it is cppFunction. You are not supposed to write a magnus opus with it. We use Then again, what we have are misfeatures/bugs. If you PR makes these better, then I am all for it. Will take another look later. Gotta get out for a run now but back later. Thanks for following up with code to discuss. Much prefered over a naked PR. |
Of course, no worries. And apologies for leaving a naked PR in the first place. Thanks for looking at this further and for the detailed reply. For context, I am writing an R package that uses What made me think it was a bug was that in the source code for
so I assumed the latter was intended, else the Many thanks once again, TJ |
I'm on board now. It is an issue you correctly identified and fixed -- so thanks. (Minor nit: |
Perfect. Many thanks. Apologies for not changing the ChangeLog - I'm still feeling my way through how to contribute in the right way. I'm used to coding by myself. Many thanks. |
No worries. Approximately nobody [1] adheres to my suggestion to keep a ChangeLog. If you do, great, if you don't I [sighs audibly] just do it myself ;-) [1] Slight exaggeration. Some people do. |
Hi,
There is an issue with
cppFunction
in that it won't compile if you require multiple libraries. A minimal reproducible example is below. (I appreciate that this example doesn't actually require theBH
andRcppArmadillo
header files, but the presence of the former means that the header file for latter isn't linked.)Running the above example causes a compilation error. I have raised a pull request (#1016 ) that fixes this. The result of me running
sessionInfo()
is:Many thanks,
TJ
The text was updated successfully, but these errors were encountered: