<div dir="ltr"><div>Thank you very much for the answers.<br><br></div><div>I was finally able to solve my problem. PKG_LIBS was the solution, I just thought since release 0.11 I wouldn’t be able to use Makevars any more, I misread it. <br><br></div><div>Again Thank you very much for the answers.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-09 18:19 GMT-03:00 Steven McKinney <span dir="ltr"><<a href="mailto:smckinney@bccrc.ca" target="_blank">smckinney@bccrc.ca</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have you tried setting flags in HOME/.R/Makevars as described in<br>
<br>
<br>
<a href="https://cran.r-project.org/doc/manuals/R-admin.html#Customizing-package-compilation" rel="noreferrer" target="_blank">https://cran.r-project.org/doc/manuals/R-admin.html#Customizing-package-compilation</a><br>
<br>
<br>
Depending on your operating system version, there are some variants for HOME/.R/Makevars file naming, described in the R Admin manual, so give that a careful read and see if that lets you accomplish your compilation and linking.<br>
<br>
<br>
<br>
Best<br>
<br>
<br>
Steven McKinney<br>
<br>
<br>
Statistician<br>
Molecular Oncology and Breast Cancer Program<br>
British Columbia Cancer Research Centre<br>
<br>
<br>
________________________________<br>
From: <a href="mailto:rcpp-devel-bounces@lists.r-forge.r-project.org">rcpp-devel-bounces@lists.r-forge.r-project.org</a> <<a href="mailto:rcpp-devel-bounces@lists.r-forge.r-project.org">rcpp-devel-bounces@lists.r-forge.r-project.org</a>> on behalf of Diego Monteiro <<a href="mailto:dvm1607@gmail.com">dvm1607@gmail.com</a>><br>
Sent: September 9, 2015 1:55 PM<br>
To: <a href="mailto:rcpp-devel@lists.r-forge.r-project.org">rcpp-devel@lists.r-forge.r-project.org</a><br>
Subject: [Rcpp-devel] Rcpp/ Boost linking problem<br>
<div class="HOEnZb"><div class="h5"><br>
Good Evening.<br>
<br>
I am pretty new to this programming universe, but I was given a task to create an R/C++ package.<br>
<br>
I am trying to link a third-party library to my R/C++ code using Rcpp 0.12.0 , I have successfully used other third party libraries on my R/C++, but when I try to use this one that uses boost my R gives me the following error:<br>
<br>
** testing if installed package can be loaded<br>
Error in dyn.load(file, DLLpath = DLLpath, ...) :<br>
  unable to load shared object '/home/diego/R/x86_64-pc-linux-gnu-library/3.2/TesteTerralib/libs/TesteTerralib.so':<br>
  /home/diego/R/x86_64-pc-linux-gnu-library/3.2/TesteTerralib/libs/TesteTerralib.so: undefined symbol: _ZN5boost6system15system_categoryEv<br>
Error: loading failed<br>
Execution halted<br>
ERROR: loading failed<br>
<br>
<br>
I have boost 1.59.0 installed, but apparently it could not be linked.<br>
Searching online I have found that maybe adding the flag -lboost_system to the g++ it would work, but I don't know how to add this flag when using RStudio nor just R in the terminal. Could anybody tell me what should I do?<br>
<br>
Best Regards<br>
Diego.<br>
</div></div></blockquote></div><br></div>