[R] Error in Calling C++ function from R!!!

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Fri Nov 24 18:58:22 CET 2006


>>product<-.C("prodgdot",myx=x,muy=y,myn=NROW(x),myoutput=as.double(0)) 
> 
> Error in .C("prodgdot", myx = x, muy = y, myn = NROW(x), myoutput = 
> as.double(0)) : 
>         C symbol name "prodgdot" not in load table 
> 
> 
> Does anyone know what is the problem? 

  C++ name mangling?

http://cran.r-project.org/doc/manuals/R-exts.html#Interfacing-C_002b_002b-code

  Solution: wrap in extern "C" { ... } as discussed there.

Barry



More information about the R-help mailing list