[Rcpp-devel] Compile errors when including Rcpp 0.11.0

Gabor Grothendieck ggrothendieck at gmail.com
Sat May 10 21:44:28 CEST 2014


On Sat, Mar 1, 2014 at 2:36 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 1 March 2014 at 20:23, Jonathon Love wrote:
> | It didn't work, I get the same error.
> |
> | I installed from github using:
> |
> | install_github("RcppCore/Rcpp")
> |
> | this updated my Rcpp to version 0.11.0.2
> |
> | but the problem persists.
> |
> | Any further suggestions?
>
> Not really.  A minimal reproducible example would help.
>
> The corpus of now 180 packages at CRAN work across OS X, Windows and Linux;
> as do 19 BioC packages in the next release plus an unknowable number of
> private packages.
>
> But there can always be fresh bugs in unseen code. But to fix something, it
> helps tremendously to be able to reproduce it.
>
> Can you assist with a small example?

As you never got a reproducible example, let me jump in to this old
thread as the error discussed, viz.
   class Rcpp::InternalFunction_Impl<Rcpp::PreserveStorage>' has no
member named 'update'
comes up with both the version of Rcpp on CRAN as well as the version
on github when running
this reproducible example:

code <- '
#include <Rcpp.h>
using namespace Rcpp ;

void callback(){
    Rprintf( "hello from calback\n" ) ;
}

// [[Rcpp::export]]
InternalFunction get_callback(){
    return InternalFunction(&callback) ;
}
'
library(Rcpp)
sourceCpp(code = code, verbose = TRUE)

This example is from Romain who posted it on SO here some time back
except I added a & before callback in the last line.
http://stackoverflow.com/questions/13904786/r-pointer-to-c-function/13910838#13910838

I am on Windows 8.1 and am using  "R version 3.1.0 Patched (2014-05-08 r65552)"

(Note that the version of Rcpp on github fails when installing during
building the vignette so I built it without vignettes; however, the
problem occurs on the CRAN version too as mentioned.)


More information about the Rcpp-devel mailing list