[Rcpp-devel] (no subject)
Dirk Eddelbuettel
edd at debian.org
Wed Jul 10 07:35:59 CEST 2013
Hi Jules,
On 9 July 2013 at 22:16, Jules Archer wrote:
| Hi,
|
| I've been trying to integrate the mathGL plotting library into R with Rcpp,
| with the ultimate goal of rendering in the browser. So far, I've been
| successful with creating simple plotting test functions, compile with sourceCpp
| ("myplotter.cpp") and output *.png and *.json files for browser 3D plotting.
Cool.
| However, when I try to compile as an R package, I keep getting the following
| error:
|
| ** building package indices
| ** testing if installed package can be loaded
| Error in dyn.load(file, DLLpath = DLLpath, ...) :
| unable to load shared object '/usr/local/lib/R/site-library/mathGL/libs/
| mathGL.so':
| /usr/local/lib/R/site-library/mathGL/libs/mathGL.so: undefined symbol:
| _ZTIN4Rcpp14not_compatibleE
| Error: loading failed
| Execution halted
| ERROR: loading failed
|
| The mathGL.so library was created and exists. For reference, I'm using the
| following flags in the Makevars file:
|
| PKG_CXXFLAGS=-"I/home/hp/Downloads/mathgl-2.1/include/mgl2" -lmgl
| PKG_LIBS=-L/usr/local/lib/
|
| Any ideas or thoughts as to what the "undefined symbol" error means and how to
| resolve this would be greatly appreciated.
Two suggestions. First, try creating a simple package without MathGL just to
make sure you have that process of going from sourceCpp via compileAttributes
to a package licked. Second, and as an alternative, try it the other way
without attributes. There are a number of simple package that link to
external libraries; you could pick any as an example.
The linmk error rings a faint bell, but I cannot quite connect the dots. You
don't by chance have two version of Rcpp installed -- in /usr/local and below
/home/hp, say?
Dirk
| Thanks!
|
| ----------------------------------------------------------------------
| _______________________________________________
| 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