<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Anyhow, I think I am probably missing some linking info from my inlinePlugIn statement. </div>
</blockquote><div><br></div><div>This is the key -- plugins that do linking are much more complicated than ones that rely on headers only. You can look at the Rcpp and RcppGSL packages as examples -- in short there needs to be a function inside the package that can cough up the correct library locations. If you get this far then your stuff will work with inline and Rcpp::cppFunction, however people developing packages that want to link against your stuff will need custom Makevars entries (which you can configure the inline plugin to produce, but by now things have gotten pretty complicated for your users).</div>
<div><br></div><div>If you can manage to do header-only "linking" that will be much, much simpler. At the lowest level the key to this is R_GetCCallable. In Rcpp land there is a GetCppCallable equivalent that works with modules. You can see the use of this in the header file which is generated by Rcpp::interfaces(r, cpp).</div>
<div><br></div><div>If you want to expose the data structure using this mechanism then you could write a function like this:</div><div><br></div><div>// [[Rcpp::export]]</div><div>Rcpp::List getModelStatistics() {</div><div>
   return <span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">StatController::getModelStatistics();</span></div><div>}</div><div><br></div><div>And then compileAttributes will automatically generate the shim that calls GetCppCallable.</div>
<div><br></div><div><br></div></div>