Hello again Rcpp Experts,  I would appreciate any insight or guidance you may offer on the errors (noted in red, below) when trying to build a package composed under Windows on the Mac.  My package uses Rcpp and RcppArmadillo with no added self-defined template constructions.  The Macs on which I&#39;ve attempted build have the latest versions of R, Rcpp and RcppArmadillo and are able to run C++ code with these classes using inline.  <div>
<br></div><div>The &quot;dlopen&quot; error message is similar to a previous post and suggests some sort of template definition problem.  I do not define any templated classes, however.  </div><div><br></div><div>Thank your for help and suggestions.  Terrance<br>
<br><div class="gmail_quote">On Tue, Oct 18, 2011 at 9:43 AM, terrance savitsky <span dir="ltr">&lt;<a href="mailto:tds151@gmail.com">tds151@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Dear Rcpp experts, I&#39;m finding difficulty to build a package (created on Win) that uses Rcpp and RcppArmadillo on the Mac.  I&#39;ve attempted the build on multiple machines to rule out local issues.   I find a June 27 post on the Rcpp list (<a href="http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2011-June/002548.html" target="_blank">http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2011-June/002548.html</a>) that experiences very similar &quot;dlopen&quot; issues as I show below, though the cause is attributed to proper construction of C++ templates.  In my case, I do not create any templated classes; only use those in Rcpp and RcppArmadillo.  In this regard, please note the upstream syntax errors when attempting to include libRcpp.a.</div>

<div><br></div><div>This post is a continuation of my previous, though I decided to change the title and re-post as I thought it would be more useful for future searches if composed this way.</div><div><br></div><font face="arial, sans-serif"><p class="MsoNormal" style="color:rgb(34, 34, 34)">

<span style="font-size:10.5pt;color:black"> Here are the error messages:</span></p><p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black"><br></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri, sans-serif"><font color="#cc0000">/Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:
line 1: syntax error near unexpected token `newline&#39;</font></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri, sans-serif"><font color="#cc0000">/Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:
line 1: `!&lt;arch&gt;&#39;</font></span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">g++-4.2 -arch x86_64
-dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup
-single_module -multiply_defined suppress -L/usr/local/lib -o growcurves.so
DPre.o lgm.o mmC.o mmCchol.o mmCmiar.o mmCmvplusDP.o mmCplusDP.o mmI.o
mmIgroup.o mmIgroupDP.o mmIplusDP.o mmmult.o
-L/Library/Frameworks/R.framework/Resources/lib/x86_64 -lRlapack -L/Library/Frameworks/R.framework/Resources/lib/x86_64
-lRblas -lgfortran -F/Library/Frameworks/R.framework/.. -framework R
-Wl,-framework -Wl,CoreFoundation</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">/Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:
line 1: syntax error near unexpected token `newline&#39;</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">/Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:
line 1: `!&lt;arch&gt;&#39;</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">installing to
/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">** R</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">** data</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">** inst</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">** preparing package for
lazy loading</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">** help</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">*** installing help
indices</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">** building package
indices ...</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">** testing if installed
package can be loaded</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">Error in dyn.load(file,
DLLpath = DLLpath, ...) : </span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri, sans-serif"><font color="#cc0000">  unable to load
shared object
&#39;/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so&#39;:</font></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri, sans-serif"><font color="#cc0000"> 
dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so,
6): Symbol not found: __ZTIN4Rcpp12not_a_matrixE</font></span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">  Referenced from:
/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">  Expected in: flat
namespace</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black"> in
/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">Error: loading failed</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">Execution halted</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">ERROR: loading failed</span></p>

<p class="MsoNormal" style="color:rgb(34, 34, 34)"><span style="font-size:10.5pt;color:black">* removing
&#39;/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves&#39;</span></p></font><div><br></div><font color="#888888">-- <br>Thank you for your help and expertise, Terrance Savitsky<br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>Thank you, Terrance Savitsky<br>
</div>