<font face="arial,helvetica,sans-serif"><br></font><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I presume that the Rcpp-attributes vignette never ever shows RcppExport, and<br>

JJ probably did not assume it could be used.<br>
<br>
And it "really" is just an alias for the uglier-looking 'extern "C"'.  And of<br>
course added by the very layers that sourceCpp() puts around the code you<br>
give it... so you are pretty much expected not to put it there.  Does using<br>
verbose=TRUE help / give any hints? </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
In my mind, the way to think about this is that sourceCpp() will compile and<br>
link the __C++ interface__ functions you give and provice __.Call() interfaces__<br>
by building wrappers.  You stuck something for the latter onto the former,<br>
things broke and you got to keep the pieces.<br></blockquote><div><br></div><div>Yes, extern "C" aka the RcppExport macro has no place here. That's a macro for use at the outer level of interop with R (which is taken care of for you by sourceCpp). If you do as Dirk mentioned and specify verbose=TRUE then you'll see that the stubs we generate from sourceCpp actually make direct use of the RcppExport macro.</div>
<div><br></div><div>J.J.</div><div> </div></div>