<div dir="ltr">Hi folks, <div><br></div><div>apologies, if I am double posting - I had problems with my mail. </div><div><br></div><div>I need some help here from experienced Rcpp developers. </div><div><br></div><div>I am coding since some time on an R-package using Rcpp and nlopt. Lately I found out that I could probably use 'nloptr' to include nlopt in my C++ code, which would give a great advantage to users of my package (instead of installing nlopt on their systems by hand). </div><div>I followed the example on <a href="https://github.com/jchiquet/RcppArmadilloNLoptExample" target="_blank">https://github.com/jchiquet/RcppArmadilloNLoptExample</a> (the nloptC one) and modified my code accordingly. When I compile my package I get the error </div><div><br></div><div>" Error: package or namespace load failed for ‘finmix’ in library.dynam(lib, package, package.lib):</div> shared object ‘nloptC.so’ not found"<div><br></div><div>In my DESCRIPTION I use in the 'Imports' and the 'LinkingTo' field 'nloptr'. In my NAMESPACE I load 'nloptC' via 'useDynLib(nloptC)'. </div><div>What I saw in the example's 'RcppExports.cpp' file is </div><div><br></div><div>RcppExport void R_init_nloptC(DllInfo *dll) {<br>    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);<br>    R_useDynamicSymbols(dll, FALSE);<br>}<br></div><div><br></div><div>This part is missing in my 'RcppExports.cpp' (I recompiled the file via 'Rcpp::compileAttributes' also tried to compile twice). I cannot explain what is missing on my side. </div><div><br></div><div>If someone of you has an idea what might be the error on my side, please let me know. I am thankful for any advice. If you want to compile my package you can find it on my GitHub at <a href="https://github.com/simonsays1980/finmix/tree/nloptapi" target="_blank">https://github.com/simonsays1980/finmix/tree/nloptapi</a>. </div><div><br></div><div>I am using R 4.0.5 on a Fedora 34 System, Rcpp 1.0.6 and nloptr 1.2.2.2. </div><div><br></div><div>Thanks for any time and efforts you spent on my problem. </div><font color="#888888"><font color="#888888"><div>Simon</div></font></font></div>