[Rcpp-devel] Making R package with Rcpp Issue: Found '_ZSt4cout'

Daniel McCarthy danielmc999 at gmail.com
Mon Aug 31 01:18:52 CEST 2015


Dirk, as expected, you are correct.  Many thanks...

Dan

On Sun, Aug 30, 2015 at 6:20 PM, Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 30 August 2015 at 16:39, Daniel McCarthy wrote:
> | Thank you Dirk!
> |
> | The issue stemmed from my using RcppArmadillo's sample function.
> Reference
> | link here:
> |
> http://gallery.rcpp.org/articles/using-the-Rcpp-based-sample-implementation/
> |
> | At the top of my .cpp file I had used the following code to be able to
> call
> | upon that function:
> |
> | #include <armadillo>
> | #include <RcppArmadilloExtensions/sample.h>
> | //[[Rcpp::depends(RcppArmadillo)]]
> |
> |
> | After I created another function that avoided my needing to call upon the
> | function that required this, then going back to putting the usual stuff
> at the
> | top of my .cpp file,
> |
> | #include <RcppArmadillo.h>
> | //[[Rcpp::depends(RcppArmadillo)]]
> |
> |
> | the note went away.
>
> Look more closely.  I suspect the issue was likely caused you including
>
>      #include <armadillo>
>
> without also including our settings. So you get vanilla Armadillo --
> without
> our override.  If you did
>
>      #include <RcppArmadillo.h>
>      #include <RcppArmadilloExtensions/sample.h>
>      // [[Rcpp::depends(RcppArmadillo)]]
>
> I am fairly certain you would RcppArmadillo AND the desired sample()
> function
> BUT NOT the dreaded cout.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150830/50d16082/attachment-0001.html>


More information about the Rcpp-devel mailing list