[Rcpp-devel] Help with Rcpp
Dirk Eddelbuettel
edd at debian.org
Mon May 12 23:17:45 CEST 2014
On 12 May 2014 at 14:03, Talita Perciano wrote:
| Hi,
|
| I'm using Rcpp with my package and I'm having some issues with version 0.11.0.
| I followed all the instructions in the manual and I don't know what is
| happening. The NAMESPACE file of my package is:
|
| useDynLib(x)
| exportPattern("^[[:alpha:]]+")
| importFrom(Rcpp, evalCpp)
|
| In the DESCRIPTION file I have the following specific lines for Rcpp:
|
| Imports: Rcpp (>= 0.11.0)
| LinkingTo: Rcpp
|
| I can run R CMD check --as-cran and R CMD INSTALL with no problems. The issue
| comes when I try to use the package in R. I can load it but it seems that some
| symbols are missing in the shared library of the package. I checked the shared
| library and I got the following issues:
|
| lan.o: In function `Rcpp::Rstreambuf<false>::sync()':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:83: undefined reference to
| `R_FlushConsole'
| lan.o: In function `Rcpp::Rstreambuf<true>::sync()':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:79: undefined reference to
| `R_FlushConsole'
| lan.o: In function `Rcpp::Rstreambuf<false>::overflow(int)':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:74: undefined reference to
| `REprintf'
| lan.o: In function `Rcpp::Rstreambuf<false>::xsputn(char const*, long)':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:65: undefined reference to
| `REprintf'
| lan.o: In function `Rcpp::Rstreambuf<true>::overflow(int)':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:70: undefined reference to
| `Rprintf'
| lan.o: In function `Rcpp::Rstreambuf<true>::xsputn(char const*, long)':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:61: undefined reference to
| `Rprintf'
Can you show the lines (from the shell prompt) that get executed when you do
R CMD INSTALL nameOfYourPackage_1.2.3.tar.gz
It looks like you are either not linling to R, or possibly on a system where
R is built as a _static_ binary (which is mighty uncommon).
These symbols should come from libR.so which is usually part of the default
build triggered by R CMD INSTALL ....
Dirk
|
| > R.version
| _
| platform x86_64-unknown-linux-gnu
| arch x86_64
| os linux-gnu
| system x86_64, linux-gnu
| status
| major 3
| minor 1.0
| year 2014
| month 04
| day 10
| svn rev 65387
| language R
| version.string R version 3.1.0 (2014-04-10)
| nickname Spring Dance
|
|
| I would appreciate if someone could help me with that.
|
| Thank you,
| Talita
|
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list