[Rcpp-devel] R - couchbase R client using Rcpp
edd at debian.org
Wed Mar 19 18:04:06 CET 2014
On 19 March 2014 at 17:32, amine gassem wrote:
| I develop a new rcouchbase package client for couchbase.
| I am following the example of rhiredis package.
| Including libcouchbase headers using : #include <libcouchbase/couchbase.h>works
| dyn.load failed to load symbol due to and undefined symbol: lcb_destroy.
| I think this is a link problem because I don't tell Rcpp compiler where/how to
| find libcouchebase libs.
| Ho can I fix this?
There is no 'Rcpp compiler', only a C++ compiler called by 'R CMD ...'.
You tell it what to link with via src/Makevars (Linux, OS X, ...) or
src/Makevars.win. See rhiredis for an (at this point) unconditional use of
the -lhiredis library.
| What I have tried:
| Should I create configure.in and makvers.in like in this RcppGSL package?
It use a call to a script gsl-config --- and I use that same trick in other
packages. It depends on what Couchbase supplies.
You could look at RPostgreSQL; or any other R packages using external
libraries. There are lots.
| Reading the vignette I did not see how can I adopt it for my needs.
| Also from this vignette it looks like this changed with Rcpp release 0.11.0.
| These ﬁles are now optional.
| And also, The rhiredis package don't provide a configure for autoconf, and I
| think it works fine.
rhiredis is not a good example as it is not a CRAN -- so its build system is
not as polished. It may not have gotten used anywhere but on Linux (and
build a hiredis library for CRAN / win-builder is on my TODO list).
Hope this helps, and as is this more-or-less "just" a basic "how do I write a
package" question, should we take this over to r-devel?
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel