<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;"><span>Krzysztof,<br></span></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;"><span><br></span></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;"><span>Thank you very much for your helpful reply.</span></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;"><span><br></span></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;">Along with your suggestions, I was finally able to track down the problem. As it turned out, I was (incorrectly) re-defining PKG_LIBS instead of adding to the already existing </div><div style="background-color: transparent;">PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` in the Makevars file. With this fix, the binary package build is successful.<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;"><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 again to you and Dirk for your help!</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:
 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Krzysztof Sakrejda <krzysztof.sakrejda@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Jules Archer <jules.archer@ymail.com> <br><b><span style="font-weight: bold;">Cc:</span></b> Dirk Eddelbuettel <edd@debian.org>; "rcpp-devel@lists.r-forge.r-project.org" <rcpp-devel@lists.r-forge.r-project.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, July 10, 2013 11:36 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Rcpp-devel] Unable to load shared object<br> </font> </div> <div class="y_msg_container"><br>On Wed, Jul 10, 2013 at 2:18 PM, Jules Archer <<a ymailto="mailto:jules.archer@ymail.com" href="mailto:jules.archer@ymail.com">jules.archer@ymail.com</a>>
 wrote:<br><br>> | However, when I try to compile as an R package, I keep getting the<br>> following<br>> | error:<br>> |<br>> | ** building package indices<br>> | ** testing if installed package can be loaded<br>> | Error in dyn.load(file, DLLpath = DLLpath, ...) :<br>> |  unable to load shared object '/usr/local/lib/R/site-library/mathGL/libs/<br>> | mathGL.so':<br>> |  /usr/local/lib/R/site-library/mathGL/libs/mathGL.so: undefined symbol:<br>> | _ZTIN4Rcpp14not_compatibleE<br><br>I don't have an immediate answer, but calling c++filt gets you:<br><br>~ $ c++filt _ZTIN4Rcpp14not_compatibleE<br>typeinfo for Rcpp::not_compatible<br><br>I get more helpful error messages when I add "-Wl,-z,defs" to the gcc<br>flags when building the library.  With those flags, the error comes up<br>at compilation.  The proximate cause of the error is that it can't<br>find the Rcpp::not_compatible exception class... the
 next clue you<br>need is probably to look at the lines of output where your library is<br>actually being compiled to see how Rcpp is being included, that's the<br>part that's failing. Sorry if this is all obvious, I can't tell from<br>your post where you're at with the Rcpp/C++ combo.<br><br>Hope that helps,<br><br>Krzysztof<br><br><br>--<br><br>Krzysztof Sakrejda<br><br>Organismic and Evolutionary Biology<br>University of Massachusetts, Amherst<br>319 Morrill Science Center South<br>611 N. Pleasant Street<br>Amherst, MA 01003<br><br>work #: 413-325-6555<br>email: <a ymailto="mailto:sakrejda@cns.umass.edu" href="mailto:sakrejda@cns.umass.edu">sakrejda@cns.umass.edu</a><br>-----------------------------------------------<br><br><br></div> </div> </div>  </div></body></html>