[Rcpp-devel] Error in Building a Package Using Rcpp
Wonsang You
wsgyou at gmail.com
Mon Jan 17 18:00:33 CET 2011
Dear Dirk,
I appreciate you for your kind guidance.
Fortunately, I could solve the error in building an R package based on Rcpp.
The error was caused by wrong environment setting of Windows.
I added a system path as an environment variable as follows.
>set path= C:\Rtools\bin
Then, the error no longer appear again, and it was so successful. Thank you.
Best Regards,
Wonsang
2011/1/17 Dirk Eddelbuettel <edd at debian.org>
>
> Hi Wonsang,
>
> On 17 January 2011 at 17:16, Wonsang You wrote:
> | 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.
>
> Very good!
>
> | 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.
>
> Just to be on the safe side, please download a simple package from
> CRAN---my
> small 'digest' package at
> http://cran.r-project.org/web/packages/digest/index.html
> would do---to 'prove' that you can build a package containing C code. We
> should
> get that step out of the way.
>
> | > 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
>
> That looks like some arcane Windows errors.
>
> I can be of no help here, but maybe someone else can.
>
> Dirk
>
> | 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
> |
> |
>
> --
> 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/a4bc2a29/attachment-0001.htm>
More information about the Rcpp-devel
mailing list