The warnings are due to the fact that the plugin looks for Makevars (and Makevars.win)<br>in cxxPack/skeleton instead of Rcpp/skeleton. When I copy to cxxPack/skeleton everything<br>works. Since it worked without this change perhaps it falls-over to using Rcpp/skeleton?<br>
<br><div class="gmail_quote">On Fri, Dec 17, 2010 at 6:02 PM, Dominick Samperi <span dir="ltr">&lt;<a href="mailto:djsamperi@gmail.com">djsamperi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Fri, Dec 17, 2010 at 12:37 PM, Romain Francois <span dir="ltr">&lt;<a href="mailto:romain@r-enthusiasts.com" target="_blank">romain@r-enthusiasts.com</a>&gt;</span> wrote:<br></div><div class="gmail_quote">
<div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Le 17/12/10 01:28, Dominick Samperi a écrit :<div><div></div><div><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I managed to create a new plugin by copy/paste/adapt<br>
Rcpp.plugin.maker. Is there a better way?<br>
<br>
Thanks,<br>
Dominick<br>
</blockquote>
<br></div></div>
Rcpp.plugin.maker is a sort of undocumented function we use for packages we write, just to avoid copy and paste.<br>
<br>
See how packages RcppArmadillo and RcppGSL use it.<br></blockquote></div><div><br>Thanks Romain, that was a good tip. Now my adaptation has been reduced<br>to the following:<br><br>inlineCxxPlugin &lt;- Rcpp:::Rcpp.plugin.maker(<br>


         include.before = &quot;#include &lt;cxxPack.hpp&gt;&quot;,<br>
         libs = cxxPack:::LdFlags(),<br>
         package = &quot;cxxPack&quot;<br>
)<br><br>The only loose end is that sometimes I get a warning like this after<br>the unit testing completes for the first time (no warning if the unit<br>test is run again):<br><br>Warning messages:<br>1: In file(con, &quot;r&quot;) :<br>

  file(&quot;&quot;) only supports open = &quot;w+&quot; and open = &quot;w+b&quot;: using the former<br>2: In file(con, &quot;r&quot;) :<br>  file(&quot;&quot;) only supports open = &quot;w+&quot; and open = &quot;w+b&quot;: using the former<br>

<br>I suspect this has something to do with how the Makefiles are opened.<br><br>BTW, it might be safer to leave it up to the test C++ code (assigned to<br>src) to optionally use &#39;using namespace whatever&#39; instead of doing this<br>

automatically, for the reasons Doug mentioned earlier.<br><br>Thanks,<br><font color="#888888">Dominick<br> 
<br></font></div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Whether there is something better than what you have done is hard to tell since you are very sparse on details adn you did not show what ypu mean by copy/paste/adapt.<br>
<br>
Romain<br><font color="#888888">
<br>
-- <br>
Romain Francois<br>
Professional R Enthusiast<br>
+33(0) 6 28 91 30 30<br>
<a href="http://romainfrancois.blog.free.fr" target="_blank">http://romainfrancois.blog.free.fr</a><br>
|- <a href="http://bit.ly/fT2rZM" target="_blank">http://bit.ly/fT2rZM</a> : highlight 0.2-5<br>
|- <a href="http://bit.ly/gpCSpH" target="_blank">http://bit.ly/gpCSpH</a> : Evolution of Rcpp code size<br>
`- <a href="http://bit.ly/hovakS" target="_blank">http://bit.ly/hovakS</a> : RcppGSL initial release<br>
<br>
<br>
</font></blockquote></div></div><br>
</blockquote></div><br>