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@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel