[Rcpp-devel] Help with Rcpp

Dirk Eddelbuettel edd at debian.org
Tue May 13 01:10:08 CEST 2014

On 12 May 2014 at 15:27, Talita Perciano wrote:
| Sure! Here is the result of R CMD INSTALL
| * installing to library ‘/home/talita/R’
| * installing *source* package ‘mypackage’ ...
| checking for g++... g++

Ok, so you know how to build a configure script. Good for you.

| config.status: creating src/Makevars
| g++ -shared -L/usr/local/lib -o mypackage.so equalize.o freqfilters.o
| incircle.o inpoly.o interface.o jpegio.o lan.o laplacian.o matrix_r.o median.o
| normalize.o quality.o save.o smooth.o sobel.o stretch.o -ljpeg -lfftw3
| installing to /home/talita/R/mypackage/libs

But this is wrong and exactly as I guessed.

Please study the R documentation about src/Makevars, the Rcpp documentation
(there is an entire vignette about how to write a package with a Rcpp, and a
corresponding chapter in my book) and/or any of the 200+ CRAN packages using

It looks like you did something by hand, and you did it wrong.  As you are
not showing us what you did we cannot help.

Just build an empty package via Rcpp.package.skeleton() and compare how it
installs.  You'll get this fixed in no time.


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

More information about the Rcpp-devel mailing list