<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Are you linking against the gretl library ?<br></div><div><br></div><div><br>Le 21 déc. 2012 à 12:12, <a href="mailto:jean.p@hushmail.com">jean.p@hushmail.com</a> a écrit :<br><br></div><blockquote type="cite"><div><span style="font-family: Arial; font-size: 13px;"><span style="font-family:Arial;font-size:13px;"><div>hi,</div><div><br></div><div>a quick question regarding a Rcpp function I wrote using an external library (gretl) : </div><div><br></div><div>with the help of a makefile (adapted from the convolution Rcpp example), the code compiles just fine and turns into a shared object in linux (.so file)</div><div><br></div><div>however, when I then try to load the newly created shared library into R using dyn.load, I get the following error message:</div><br><div><pre class="GNVMTOMCABB" style="font-family:'Ubuntu Mono', 'Droid Sans Mono', 'DejaVu Sans Mono', monospace;border:none;white-space:pre-wrap!important;line-height:16px;background-color:#e1e2e5;"><span class="GNVMTOMCHAB ace_keyword" style="color:blue;">dyn.load("/home/jean/Documents/code experiments/gretl/test2.so")
</span><span class="GNVMTOMCLAB  ace_constant" style="color:#c5060b;">Error in dyn.load("/home/jean/Documents/code experiments/gretl/test2.so") : 
  unable to load shared object '/home/jean/Documents/code experiments/gretl/test2.so':
  /home/jean/Documents/code experiments/gretl/test2.so: undefined symbol: _Z13kalman_smoothP7kalman_PP13gretl_matrix_S3_Pi</span></pre></div><div><br></div><div>The undefined symbol is in fact (after c++ unmangling) kalman_smooth(kalman_*, gretl_matrix_**, gretl_matrix_**, int*), a function from the gretl library</div><div><br></div><div>Do you think the problem comes from the c++ mangling of gretl's  C library or is it rather linked to internals of gretl ?</div><div><br></div><div>many thanks for your help!</div><div><br></div><div>jean</div><div><br></div><div><br></div><div><br></div><div><br></div></span></span></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Rcpp-devel mailing list</span><br><span><a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a></span><br><span><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></span></div></blockquote></body></html>