[Rcpp-devel] Error in Building a Package Using Rcpp

Wonsang You wsgyou at gmail.com
Mon Jan 17 17:16:28 CET 2011


Dear Dirk,

Thank you so much for your kind help. I would like to reply to your
questions.

Q1) Did you install Rtools as well?
Of course, I installed Rtools 2.12.

Q2) Have you ever compiled an R package from source on Windows?
Yes. Before compiling the package "mypackage"  in the Windows Command
Prompt, I opened the package from Eclipse as a project, and I ran its R
function in R console as follows.

> Rcpp_hello_world()

But, nothing happened. Thus, I tried to build a package from the skeleton.

Q3) the command you executed
Please, refer to the above answer.

Q4) the errors you got
In the Windows Command Prompt, I had the following error message.

> R CMD build mypackage
checking for file 'mypackage/DESCRIPTION' ... OK
preparing 'mypackage':
checking DESCRIPTION meta-information ... OK
cleaning src
ERROR
copying to build directory failed

Also, a popup window opened with the error message "the operation of
'make.exe' was stopped."
Then, it suggested to refer the following files, but I could not find them
in the specified folder.

\AppData\Local\Temp\WER9159.tmp.WERInternalMetadata.xml
\AppData\Local\Temp\WER9D1D.tmp.appcompat.txt
\AppData\Local\Temp\WERA078.tmp.mdmp

I attached some codes of the package.

-- rcpp_hello_world.R

rcpp_hello_world <- function(){
     .Call("rcpp_hello_world", PACKAGE="mypackage")
}

-- rcpp_hello_world.cpp

#include "rcpp_hello_world.h"

SEXP rcpp_hello_world(){
     using namespace Rcpp;
     CharacterVector x = CharacterVector::create( "foo", "bar" )  ;
     NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;
     List z            = List::create( x, y ) ;
     return z ;
}


2011/1/17 Dirk Eddelbuettel <edd at debian.org>

>
> Dear Wonsang,
>
> On 17 January 2011 at 16:34, Wonsang You wrote:
> | Dear Rcpp developers,
> |
> | I am not familiar with Rcpp package. To integrate R and C++, I installed
> the
> | 'Rcpp' package on Windows. Then, I created a template skeleton according
> to the
>
> Did you install Rtools as well?
>
> Have you ever compiled an R package from source on Windows?
>
> | documentation (http://dirk.eddelbuettel.com/code/rcpp/Rcpp-package.pdf)
> as
> | follows.
> |
> | > Rcpp.package.skeleton("mypackage")
> |
> | Then, I had a set of files, and I tried to build a package by the
> following
> | command in the Command Prompt.
> |
> | c:\workspace> R CMD build mypackage
> |
> | But, I always had an error when it called 'make.exe'.  Can anyone help me
> to
> | solve such a problem?
>
> We do not have mind readers.  So unless you show us
>
>   i)   the command you executed
>
>   ii)  the errors you got
>
> we are in not position to help.
>
> Cheers, Dirk
>
>
> | Best Regards,
> | Wonsang You
> |
> | --
> | Leibniz Institute for Neurobiology
> |
> | ----------------------------------------------------------------------
> | _______________________________________________
> | Rcpp-devel mailing list
> | Rcpp-devel at lists.r-forge.r-project.org
> | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110117/13d3175d/attachment.htm>


More information about the Rcpp-devel mailing list