[Rcpp-devel] <no subject>

Dirk Eddelbuettel edd at debian.org
Thu Mar 24 17:17:24 CET 2011


Hi Steve,

Good to know you are here too :)

On 24 March 2011 at 12:07, Steve Lianoglou wrote:
| Hi,
| 
| I'm (certainly) no Rcpp expert -- but have just one comment that might
| help for this and other people who might find themselves in this
| particular part of the situation regarding linking against an external
| library (w/o pulling in all sources into your project):
| 
| On Thu, Mar 24, 2011 at 8:33 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
| [aggressive quote trimming]
| > | source files into the src directory. I'd much rather just link to the already
| ...
| > | compiled and functional library with small functions but haven't found any way
| > | to do that. If you could help me with that, I would very much appreciate it. I
| > | need to link to my library, I assume there might be some need for my headers,
| > | and also to the headers and libraries referenced by it. If you could give me a
| > | generic mechanism for doing that, I'd very much appreciate it.
| >
| > "We" (as in the whole R community) do that via 2900+ working packages on
| > CRAN. Study those -- pick any one you like and use, and then dissect it.
| 
| In particular, the RSQLite package has provisions for you installing
| it against a version of sqlite that's already installed on your system
| (or you can optionally just install with the version of sqlite that
| comes with the package).
| 
| Grab the sources here:
| 
| http://cran.r-project.org/src/contrib/RSQLite_0.9-4.tar.gz
| 
| Extract it and read through the inst/INSTALL file. Particularly at point (2).
| 
| Hope that helps (and apologies if I'm off the mark here :-),

Sure -- several Rcpp-using packages on CRAN are in a similar situation with
respect to external libraries such as eg the GSL, or the SNNS lib, or
ProtoBuf, or ... and Rcpp itself actually started as an interface to QuantLib
within the RQuantLib package.  

So your mail is not off the mark ... but not helpful per se as Sean was
struggling to get the linking etc sorted out. Now pointing to him also learn
autoconf and friends---while the Right Thing (TM) in the long run---does not
help in the short run.  That's what I tried to get at in my mail.

We have an entire vignette devoted to adding Rcpp to your package, and I
suppose I ought to add a section on how to do that when you also use external
libraries.  

Dirk

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


More information about the Rcpp-devel mailing list