Re: [Rd] Problem to execute a function loading by my package that I created

From: Simon Urbanek <simon.urbanek_at_r-project.org>
Date: Fri, 03 Jun 2011 10:02:17 -0400

Pauline,

since you mentioned Rcpp, you're on the wrong list. I have put some comments below but they assume you're using regular R packaging and not Rcpp.

On Jun 3, 2011, at 4:41 AM, Po wrote:

> I still look for my problem.
> I think that maybe my Makefile is not good.
>
> In my folder src of my package, I put an existing program. In this program,
> I had already a makefile.
> So I kept this makefile and I changed.
>

Thats generally not a safe idea, because R has its own ways of compiling and linking so you would have to replicate that. If what you have is a stand-alone library, you can put it in a separate directory in your package and have it build itself so src will consist of the interface between R and you library only.

If what you have is essentially the package code in C++ then you don't need a Makefile at all - R will simply compile all sources you put in src and create a shared object for the package from it. You don't need to do anything, just remove your Makefile.

> I saw that it's better to have a file Makevars to compile. But I don't know what is a file Makevars and I don't know how I can gather the files Makefile and Makevars together.
>

Makevars is simply a makefile without compilation and linking rules as those are provided by R automatically. See recent posts about it on this list.

Cheers,
Simon

> Thank you in advance,
>
> Pauline
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Problem-to-execute-a-function-loading-by-my-package-that-I-created-tp3568081p3570314.html
> Sent from the R devel mailing list archive at Nabble.com.
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 03 Jun 2011 - 14:04:28 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 03 Jun 2011 - 16:20:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive