[Rcpp-devel] linking error when using matrices?
Hao Ye
hye at ucsd.edu
Tue Nov 26 00:59:08 CET 2013
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
hye at ucsd.edu
More information about the Rcpp-devel
mailing list