Skip to content
Prev 1862 / 10988 Next

[Rcpp-devel] Building/linking trouble with cxxfunction()

On 16 February 2011 at 16:20, Ken.Williams at thomsonreuters.com wrote:
| On 2/16/11 4:00 PM, "Dirk Eddelbuettel" <edd at debian.org> wrote:
| >Here is an updated version of the 'secondExample' from that aforementioned
| >example file in Rcpp.  It uses the plugin generator facility to override
| >LIBS which makes it work on my box.
| 
| Aha, I hadn't suspected that plugins would be the secret to using
| libraries. 

No, as I tried to explain in great length. The minimal example should always
be

	$ export PKG_CXXFLAGS="...some header location..."
	$ export PKG_LIBS="...some libs..."
	$ R CMD SHLIB foo.cpp

and inline / cxxfunction can be of help if you know these values.

| Thanks for the pointer, I'll give this a shot in addition to
| the code that Doug posted.

I also had look at RcppGSL and why I needed to muck with the generator. My
installation must have had a test version.  Once I reinstalled RcppGSL from
either SVN or the released version, the normal behaviour worked ie

    funx <- cxxfunction(signature(par="numeric"), gslrng,
                        plugin="RcppGSL",
                        includes = "#include <gsl/gsl_rng.h>")

for the example posted earlier.  That is how it should work -- we employ
RcppGSL, we want an additional header which I list, and the rest 'just works'.

| Is the Rcpp:::Rcpp.plugin.maker() function documented anywhere?

Well theree is source, and there are package using it.  There was a prior
discussion on the list here in December.  But that is about it at this point.

Patches always welcome! Some user have in fact sent us documentation patches....
 
Dirk

Thread (56 messages)

Ken.Williams at thomsonreuters.com Building/linking trouble with cxxfunction() Feb 16 Dirk Eddelbuettel Building/linking trouble with cxxfunction() Feb 16 Douglas Bates Building/linking trouble with cxxfunction() Feb 16 Ken.Williams at thomsonreuters.com Building/linking trouble with cxxfunction() Feb 16 Ken.Williams at thomsonreuters.com Building/linking trouble with cxxfunction() Feb 16 Douglas Bates Building/linking trouble with cxxfunction() Feb 16 Dirk Eddelbuettel Building/linking trouble with cxxfunction() Feb 16 Ken.Williams at thomsonreuters.com Building/linking trouble with cxxfunction() Feb 16 Ken.Williams at thomsonreuters.com Building/linking trouble with cxxfunction() Feb 16 Dirk Eddelbuettel Building/linking trouble with cxxfunction() Feb 16 Ken.Williams at thomsonreuters.com Building/linking trouble with cxxfunction() Feb 16 Dirk Eddelbuettel Building/linking trouble with cxxfunction() Feb 16 Ken.Williams at thomsonreuters.com Building/linking trouble with cxxfunction() Feb 18 Douglas Bates Building/linking trouble with cxxfunction() Feb 19 Ken.Williams at thomsonreuters.com Building/linking trouble with cxxfunction() Feb 22 Dirk Eddelbuettel Building/linking trouble with cxxfunction() Feb 22 Douglas Bates Building/linking trouble with cxxfunction() Feb 22 Ken.Williams at thomsonreuters.com Building/linking trouble with cxxfunction() Feb 22 Dirk Eddelbuettel Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Dirk Eddelbuettel Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Rainer Hurling Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Ken.Williams at thomsonreuters.com Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Dirk Eddelbuettel Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Dirk Eddelbuettel Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Dirk Eddelbuettel Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Baptiste Auguie Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Ken.Williams at thomsonreuters.com Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Ken.Williams at thomsonreuters.com Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Dirk Eddelbuettel Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Ken.Williams at thomsonreuters.com Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Ken.Williams at thomsonreuters.com Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Dirk Eddelbuettel Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Ken.Williams at thomsonreuters.com Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Dirk Eddelbuettel Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Baptiste Auguie Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Baptiste Auguie Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Baptiste Auguie Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Dirk Eddelbuettel Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Simon Urbanek Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Dirk Eddelbuettel Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()] Feb 22 Dirk Eddelbuettel Release candidate (Was: Ancient Rcpp for OS X on CRAN) Feb 23 Ken.Williams at thomsonreuters.com Release candidate (Was: Ancient Rcpp for OS X on CRAN) Feb 23 Dirk Eddelbuettel Release candidate (Was: Ancient Rcpp for OS X on CRAN) Feb 23 Baptiste Auguie Release candidate (Was: Ancient Rcpp for OS X on CRAN) Feb 23 Simon Urbanek Release candidate (Was: Ancient Rcpp for OS X on CRAN) Feb 23 Dirk Eddelbuettel Release candidate (Was: Ancient Rcpp for OS X on CRAN) Feb 23