<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Alex,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
Did you add an entry for bigmemory in the Depends field of the package DESCRIPTION file? That would certainly explain the errors you are seeing.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">J.J.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 10, 2013 at 12:50 PM, Alex Ustian <span dir="ltr"><<a href="mailto:alex.l.ustian@gmail.com" target="_blank">alex.l.ustian@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Sorry for this double post, I am now correctly subscribed to the list!<br></div>
<div><br>Hello, <br><br></div>I'm having an issue 
building a package (named bigExplore) in RStudio which uses both Rcpp 
and the MatrixAccessor from bigmemory.  All of my functions seem to work
 fine when I was interactively developing them via sourceCpp.<br>
<br></div>The head of a sample .cpp file is: <br><br>// [[Rcpp::depends(bigmemory)]]<br>#include <Rcpp.h><br>#include <bigmemory/MatrixAccessor.hpp><br><br>// [[Rcpp::export]]<br>void cbindWriter(Rcpp::XPtr<BigMatrix> pA, Rcpp::XPtr<BigMatrix> pB, Rcpp::XPtr<BigMatrix> pC) <br>


...<br><br></div>My DESCRIPTION file contains:<br>Depends: bigmemory(>= 4.2.11), Rcpp(>= 0.10.3), RcppArmadillo(>= 0.3.800.1)<br>LinkingTo: bigmemory, Rcpp, RcppArmadillo<br><br></div>NAMESPACE:<br>useDynLib(bigExplore)<br>


exportPattern("^[[:alpha:]]+")<br><br></div>and I made the two Makevars(.win) files for the src directory with:<br><pre><code>PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`<br></code><code>PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()")<br>


<br></code></pre><pre><code>When I hit Build&Reload in RStudio I get the following message which seems to be complaining about not being able to find the bigmemory header infos<br></code><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;background-color:rgb(225,226,229);font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:'Lucida Console';word-spacing:0px"><pre style="outline-style:none;outline-width:initial;outline-color:initial;font:inherit!important;width:278px;border-style:none;white-space:pre-wrap!important;border-color:initial;margin:0px;border-width:initial">
<span style="color:blue">==> Rcpp::compileAttributes()

</span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px"></span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px;color:rgb(197,6,11)">
bigmemory >= 4.0 is a major revision since 3.1.2; please see package
biganalytics and <a href="http://www.bigmemory.org" target="_blank">http://www.bigmemory.org</a> for more information.

</span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px">
</span><span style="color:blue">==> Rcmd.exe INSTALL --no-multiarch bigExplore

</span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px">* installing to library 'C:/Users/Alex/Documents/R/win-library/2.15'
</span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px"></span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px">* installing *source* package 'bigExplore' ...
</span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px">** libs
</span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px"></span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px">g++ -m64 -I"C:/PROGRA~1/R/R-215~1.3/include" -DNDEBUG    -I"C:/Users/Alex/Documents/R/win-library/2.15/bigmemory/include" -I"C:/Users/Alex/Documents/R/win-library/2.15/Rcpp/include" -I"C:/Users/Alex/Documents/R/win-library/2.15/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall  -mtune=core2 -c RcppExports.cpp -o RcppExports.o
</span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px"></span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px">RcppExports.cpp:10:29: error: 'BigMatrix' was not declared in this scope
</span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px">RcppExports.cpp:10:38: error: template argument 1 is invalid
</span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px">RcppExports.cpp:10:38: error: template argument 2 is invalid
</span><span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px">RcppExports.cpp:10:55: error: 'BigMatrix' was not declared in this scope<br>


<br></span></pre><pre style="outline-style:none;outline-width:initial;outline-color:initial;font:inherit!important;width:278px;border-style:none;white-space:pre-wrap!important;border-color:initial;margin:0px;border-width:initial">
<span style="outline-style:none;outline-width:initial;outline-color:initial;border-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin:0px">and so on... <br></span></pre></span><br>
</pre><pre>The RcppExports.cpp that is generated starts out like:<br><br>// This file was generated by Rcpp::compileAttributes<br>// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393<br><br>#include <RcppArmadillo.h><br>


#include <Rcpp.h><br><br>using namespace Rcpp;<br><br>// cbindWriter<br>void cbindWriter(Rcpp::XPtr<BigMatrix> pA, Rcpp::XPtr<BigMatrix> pB, Rcpp::XPtr<BigMatrix> pC);<br>...<br></pre><pre>which doesn't include any of the bigmemory header information.<br>


<br></pre><pre>I did see a recent similar question that was archived on Google <br><a href="http://www.mail-archive.com/rcpp-devel@lists.r-forge.r-project.org/msg05232.html" target="_blank">http://www.mail-archive.com/rcpp-devel@lists.r-forge.r-project.org/msg05232.html</a><br>


</pre><pre>but it appears that a solution was found by adding bigmemory into the depends part of the DESCRIPTION file.  (which I have already done)<br><br>Thanks in advance for your patience and taking the time to look over my problem.<span class="HOEnZb"><font color="#888888"><span><font color="#888888"><br>


<br>Alex Ustian</font></span></font></span></pre></div>
<br>_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br></blockquote></div><br></div>