<div dir="ltr"><div><div><div style>Hi guys,</div></div></div><div style><br></div><div style>When I attempt to 'sourceCpp' the following code, the R session crashes:</div><div style><br></div><div style><div>#include <Rcpp.h></div>
<div>using namespace Rcpp;</div><div><br></div><div>// [[Rcpp::export]]</div><div>IntegerVector counts(NumericVector x) {</div><div>  return table(x);</div><div>}</div><div><br></div><div style>The same code worked in Rcpp 0.10.2.</div>
<div style><br></div><div style>A hint to the error comes if I try to compile a package with that source code in a .cpp file: I get the error, when attempting to load the package:</div><br>dlopen(/Library/Frameworks/R.framework/Versions/2.15/Resources/library/anRpackage/libs/x86_64/anRpackage.so, 6): Symbol not found: __ZN4Rcpp8internal16coerce_to_stringILi14EEEPKcNS_6traits12storage_typeIXT_EE4typeE<br>
  Referenced from: /Library/Frameworks/R.framework/Versions/2.15/Resources/library/anRpackage/libs/x86_64/anRpackage.so<br>  Expected in: flat namespace<br> in /Library/Frameworks/R.framework/Versions/2.15/Resources/library/anRpackage/libs/x86_64/anRpackage.so<br>
<br></div><div style>This is with R 2.15.3 on Mac OSX 10.8.3.</div><div style><br></div><div style>-----</div><div style><br></div><div style>In addition, if I attempt to compile Rcpp from source (with gcc 4.8) I get the following warnings:</div>
<div style><br></div><div style><div>> install.packages("Rcpp", type="source", INSTALL_opts="--no-multiarch")</div><div>Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’</div>
<div>(as ‘lib’ is unspecified)</div><div>trying URL '<a href="http://cran.rstudio.com/src/contrib/Rcpp_0.10.3.tar.gz">http://cran.rstudio.com/src/contrib/Rcpp_0.10.3.tar.gz</a>'</div><div>Content type 'application/x-gzip' length 2395986 bytes (2.3 Mb)</div>
<div>opened URL</div><div>==================================================</div><div>downloaded 2.3 Mb</div><div><br></div><div>* installing *source* package ‘Rcpp’ ...</div><div>** package ‘Rcpp’ successfully unpacked and MD5 sums checked</div>
<div>** libs</div><div>*** arch - x86_64</div><div>g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I../inst/include/ -I/usr/local/include    -fPIC  -g -O3 -Wall -pedantic -c Date.cpp -o Date.o</div>
<div>g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I../inst/include/ -I/usr/local/include    -fPIC  -g -O3 -Wall -pedantic -c Module.cpp -o Module.o</div>
<div>In file included from ../inst/include/Rcpp/Module.h:352:0,</div><div>                 from ../inst/include/Rcpp.h:63,</div><div>                 from Module.cpp:22:</div><div>../inst/include/Rcpp/module/class.h: In member function ‘Rcpp::class_<Class>::self& Rcpp::class_<Class>::derives(const char*)’:</div>
<div>../inst/include/Rcpp/module/class.h:495:56: warning: typedef ‘parent_prop_class’ locally defined but not used [-Wunused-local-typedefs]</div><div>             typedef typename parent_class_::prop_class parent_prop_class ;</div>
<div style><snip, snip></div><div><br></div><div style>although the package does install successfully. Not sure if it's related or not.</div><div style><br></div><div style>Thanks,</div></div><div style>-Kevin</div>
</div>