Have you compiled Rcpp from source ?
If not, are you compiling with the same compiler that was used to compile Rcpp.

The cran binary for Rcpp 0.10.6 was built with llvm-g++ wherehas preseumably you are using clang now on Mavericks.

Please try compiling Rcpp from source.

Romain

Le 26/11/2013 00:59, Hao Ye a écrit :
Hi,

I just got started using Rcpp after spending a fair amount of time working in 
the two separately. I'm currently running into some errors with c++ code that 
tries to use the matrix classes in Rcpp:

library(Rcpp)
cppFunction("int mwe() {NumericMatrix mat(1,1); return 0;}")

Error in 
dyn.load("/var/folders/zf/w0dsd0yn3d7czjqv5rbj9xph0000gn/T//RtmplA25bk/sourcecpp_fb48bcd5d63/sourceCpp_14740.so")
 :
   unable to load shared object 
'/var/folders/zf/w0dsd0yn3d7czjqv5rbj9xph0000gn/T//RtmplA25bk/sourcecpp_fb48bcd5d63/sourceCpp_14740.so':
   
dlopen(/var/folders/zf/w0dsd0yn3d7czjqv5rbj9xph0000gn/T//RtmplA25bk/sourcecpp_fb48bcd5d63/sourceCpp_14740.so,
 6): Symbol not found: 
__ZNK4Rcpp7RObject4attrERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
   Referenced from: 
/var/folders/zf/w0dsd0yn3d7czjqv5rbj9xph0000gn/T//RtmplA25bk/sourcecpp_fb48bcd5d63/sourceCpp_14740.so
   Expected in: flat namespace
  in 
/var/folders/zf/w0dsd0yn3d7czjqv5rbj9xph0000gn/T//RtmplA25bk/sourcecpp_fb48bcd5d63/sourceCpp_14740.so

This is the same basic error I get when I try to run the RcppGibbs.R example or 
Rcpp-unitTests.R. C==filt says the

I'm currently on OS X 10.9 with R 3.0.2 and Rcpp 0.10.6.

Does anyone know how to fix this?

Best,
--
Hao Ye
h...@ucsd.edu


--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30

_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to