[Rcpp-devel] (no subject)

Jules Archer jules.archer at ymail.com
Wed Jul 10 07:16:55 CEST 2013


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. 

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.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130709/da0b7b2f/attachment.html>


More information about the Rcpp-devel mailing list