<font class="Apple-style-span" face="georgia, serif">Dear Dirk,</font><div><font class="Apple-style-span" face="georgia, serif"><br></font></div><div><font class="Apple-style-span" face="georgia, serif">I appreciate you for your kind guidance.</font></div>
<div><font class="Apple-style-span" face="georgia, serif">Fortunately, I could solve the error in building an R package based on Rcpp. The error was caused by wrong environment setting of Windows.</font></div><div><font class="Apple-style-span" face="georgia, serif">I added a system path as an environment variable as follows.</font></div>
<div><font class="Apple-style-span" face="georgia, serif"><br></font></div><div><font class="Apple-style-span" face="georgia, serif">&gt;set path= C:\Rtools\bin</font></div><div><font class="Apple-style-span" face="georgia, serif"><br>
</font></div><div><font class="Apple-style-span" face="georgia, serif">Then, the error no longer appear again, and it was so successful. Thank you.</font></div><div><font class="Apple-style-span" face="georgia, serif"><br>
</font></div><div><font class="Apple-style-span" face="georgia, serif">Best Regards,</font></div><div><font class="Apple-style-span" face="georgia, serif">Wonsang</font></div><div>
<br><br><div class="gmail_quote">2011/1/17 Dirk Eddelbuettel <span dir="ltr">&lt;<a href="mailto:edd@debian.org">edd@debian.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hi Wonsang,<br>
<div class="im"><br>
On 17 January 2011 at 17:16, Wonsang You wrote:<br>
| Thank you so much for your kind help. I would like to reply to your questions.<br>
|<br>
| Q1) Did you install Rtools as well?<br>
| Of course, I installed Rtools 2.12.<br>
<br>
</div>Very good!<br>
<div class="im"><br>
| Q2) Have you ever compiled an R package from source on Windows?<br>
| Yes. Before compiling the package &quot;mypackage&quot;  in the Windows Command Prompt, I<br>
| opened the package from Eclipse as a project, and I ran its R function in R<br>
| console as follows.<br>
<br>
</div>Just to be on the safe side, please download a simple package from CRAN---my<br>
small &#39;digest&#39; package at <a href="http://cran.r-project.org/web/packages/digest/index.html" target="_blank">http://cran.r-project.org/web/packages/digest/index.html</a><br>
would do---to &#39;prove&#39; that you can build a package containing C code. We should<br>
get that step out of the way.<br>
<div class="im"><br>
| &gt; Rcpp_hello_world()<br>
|<br>
| But, nothing happened. Thus, I tried to build a package from the skeleton.<br>
|<br>
| Q3) the command you executed<br>
| Please, refer to the above answer.<br>
|<br>
| Q4) the errors you got<br>
| In the Windows Command Prompt, I had the following error message.<br>
|<br>
| &gt; R CMD build mypackage<br>
| checking for file &#39;mypackage/DESCRIPTION&#39; ... OK<br>
| preparing &#39;mypackage&#39;:<br>
| checking DESCRIPTION meta-information ... OK<br>
| cleaning src<br>
| ERROR<br>
| copying to build directory failed<br>
|<br>
| Also, a popup window opened with the error message &quot;the operation of &#39;make.exe&#39;<br>
| was stopped.&quot;<br>
| Then, it suggested to refer the following files, but I could not find them in<br>
| the specified folder.<br>
|<br>
| \AppData\Local\Temp\WER9159.tmp.WERInternalMetadata.xml<br>
| \AppData\Local\Temp\WER9D1D.tmp.appcompat.txt<br>
| \AppData\Local\Temp\WERA078.tmp.mdmp<br>
<br>
</div>That looks like some arcane Windows errors.<br>
<br>
I can be of no help here, but maybe someone else can.<br>
<font color="#888888"><br>
Dirk<br>
</font><div><div></div><div class="h5"><br>
| I attached some codes of the package.<br>
|<br>
| -- rcpp_hello_world.R<br>
|<br>
| rcpp_hello_world &lt;- function(){<br>
|      .Call(&quot;rcpp_hello_world&quot;, PACKAGE=&quot;mypackage&quot;)<br>
| }<br>
|<br>
| -- rcpp_hello_world.cpp<br>
|<br>
| #include &quot;rcpp_hello_world.h&quot;<br>
|<br>
| SEXP rcpp_hello_world(){<br>
|      using namespace Rcpp;<br>
|      CharacterVector x = CharacterVector::create( &quot;foo&quot;, &quot;bar&quot; )  ;<br>
|      NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;<br>
|      List z            = List::create( x, y ) ;    <br>
|      return z ;     <br>
| }<br>
|<br>
|<br>
| 2011/1/17 Dirk Eddelbuettel &lt;<a href="mailto:edd@debian.org">edd@debian.org</a>&gt;<br>
|<br>
|<br>
|     Dear Wonsang,<br>
|<br>
|     On 17 January 2011 at 16:34, Wonsang You wrote:<br>
|     | Dear Rcpp developers,<br>
|     |<br>
|     | I am not familiar with Rcpp package. To integrate R and C++, I installed<br>
|     the<br>
|     | &#39;Rcpp&#39; package on Windows. Then, I created a template skeleton according<br>
|     to the<br>
|<br>
|     Did you install Rtools as well?<br>
|<br>
|     Have you ever compiled an R package from source on Windows?<br>
|<br>
|     | documentation (<a href="http://dirk.eddelbuettel.com/code/rcpp/Rcpp-package.pdf" target="_blank">http://dirk.eddelbuettel.com/code/rcpp/Rcpp-package.pdf</a>)<br>
|     as<br>
|     | follows.<br>
|     |<br>
|     | &gt; Rcpp.package.skeleton(&quot;mypackage&quot;)<br>
|     |<br>
|     | Then, I had a set of files, and I tried to build a package by the<br>
|     following<br>
|     | command in the Command Prompt.<br>
|     |<br>
|     | c:\workspace&gt; R CMD build mypackage<br>
|     |<br>
|     | But, I always had an error when it called &#39;make.exe&#39;.  Can anyone help me<br>
|     to<br>
|     | solve such a problem?<br>
|<br>
|     We do not have mind readers.  So unless you show us<br>
|<br>
|       i)   the command you executed<br>
|<br>
|       ii)  the errors you got<br>
|<br>
|     we are in not position to help.<br>
|<br>
|     Cheers, Dirk<br>
|<br>
|<br>
|     | Best Regards,<br>
|     | Wonsang You<br>
|     |<br>
|     | --<br>
|     | Leibniz Institute for Neurobiology<br>
|     |<br>
|     | ----------------------------------------------------------------------<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>
|<br>
|     --<br>
|     Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
|<br>
|<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
</div></div></blockquote></div><br></div>