<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">Hi,</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">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. </div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style:
 normal;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">However, when I try to compile as an R package, I keep getting the following error:</div><div style="background-color: transparent;"><font face="times new roman, new york, times, serif"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><font face="times new roman, new york, times, serif">** building package indices</font></div><div style="background-color: transparent;"><font face="times new roman, new york, times, serif">** testing if installed package can be loaded</font></div><div style="background-color: transparent;"><font face="times new roman, new york, times, serif">Error in dyn.load(file, DLLpath = DLLpath, ...) : </font></div><div
 style="background-color: transparent;"><font face="times new roman, new york, times, serif">  unable to load shared object '/usr/local/lib/R/site-library/mathGL/libs/mathGL.so':</font></div><div style="background-color: transparent;"><font face="times new roman, new york, times, serif">  /usr/local/lib/R/site-library/mathGL/libs/mathGL.so: undefined symbol: _ZTIN4Rcpp14not_compatibleE</font></div><div style="background-color: transparent;"><font face="times new roman, new york, times, serif">Error: loading failed</font></div><div style="background-color: transparent;"><font face="times new roman, new york, times, serif">Execution halted</font></div><div style="background-color: transparent;"><font face="times new roman, new york, times, serif">ERROR: loading failed</font></div><div><br></div><div>The mathGL.so library was created and exists. For reference, I'm using the following flags in the Makevars file:</div><div style="font-family: 'times
 new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="background-color: transparent;"><font face="times new roman, new york, times, serif">PKG_CXXFLAGS=-"I/home/hp/Downloads/mathgl-2.1/include/mgl2" -lmgl</font></div><div style="background-color: transparent;"><font face="times new roman, new york, times, serif">PKG_LIBS=-L/usr/local/lib/</font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><font face="times new roman, new york, times, serif"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;">Any ideas or thoughts as to what the "undefined symbol" error means and how to resolve this would be greatly
 appreciated.</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;">Thanks!</div></div></body></html>