<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">>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"><<a href="mailto:edd@debian.org">edd@debian.org</a>></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 "mypackage" 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 'digest' 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 'prove' that you can build a package containing C code. We should<br>
get that step out of the way.<br>
<div class="im"><br>
| > 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>
| > R CMD build mypackage<br>
| checking for file 'mypackage/DESCRIPTION' ... OK<br>
| preparing 'mypackage':<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 "the operation of 'make.exe'<br>
| was stopped."<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 <- function(){<br>
| .Call("rcpp_hello_world", PACKAGE="mypackage")<br>
| }<br>
|<br>
| -- rcpp_hello_world.cpp<br>
|<br>
| #include "rcpp_hello_world.h"<br>
|<br>
| SEXP rcpp_hello_world(){<br>
| using namespace Rcpp;<br>
| CharacterVector x = CharacterVector::create( "foo", "bar" ) ;<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 <<a href="mailto:edd@debian.org">edd@debian.org</a>><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>
| | 'Rcpp' 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>
| | > Rcpp.package.skeleton("mypackage")<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> R CMD build mypackage<br>
| |<br>
| | But, I always had an error when it called 'make.exe'. 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>