[Rcpp-devel] Packaging - and even more packaging

Dirk Eddelbuettel edd at debian.org
Sun Feb 3 23:53:47 CET 2013


Simon,

On 3 February 2013 at 14:51, Douglas Bates wrote:
| On Sun, Feb 3, 2013 at 2:41 PM, Simon Zehnder <szehnder at uni-bonn.de> wrote:
|     Is it even possible to put already a static library into the package and
|     then compile? Or do I have to put in all source files of the NLopt library
|     and create during compiling the package the static library of the NLopt
|     library?
| 
| 
| It is possible and we do so in the Matrix package where we have the .a files
| from the various SuiteSparse C libraries but we modify the makefiles in those
| libraries so that the .a file ends up in the src directory, not a subdirectory
| of src.
| 
| It seems to work. 

Many R packages do, some 'embed' the libraries they need. RSQLite has always
shipped with its copy of SQLite, and RPostgreSQL now contains code from the
psql client as we can't assume Windows to be providing usable libraries
(which are still used on OSs with an X in their name) for connections to
PostgreSQL backends.

This is a generic 'how do I organize my package' question and no longer has
anything to do with Rcpp.  The same is true with your previous question about
NLopt: that ball is in your court too about how to properly find headers.
Nothing Rcpp specific in that question, so this list may not be the best
forum for such questions.

Borrowing from other CRAN packages is usually a smart trick. You just need
to know where to look.  "Matrix" by Doug and Martin is another fine example.

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list