Le 18/08/10 13:22, Dirk Eddelbuettel a écrit :

On 18 August 2010 at 09:10, Romain Francois wrote:
| Yep, that is because of RcppExport. You only use RcppExport when you
| call the function from .Call in R.
|
| RcppExport is an alias to extern "C" so it essentially voids the
| C++-ness of the function it is applied to.

For completeness:  It also provided a hook to add __declspec(dllexport) for
the one operating system that needed it when building DLLs.  We currently
don't build DLLs there so this is moot but the option may be useful.  Hence
RcppExport and not just extern "C".

Not the way it is currently defined ;

// #ifdef BUILDING_DLL
// #define RcppExport extern "C" __declspec(dllexport)
// #else
#define RcppExport extern "C"
// #endif

Also:

On 18 August 2010 at 08:41, Romain Francois wrote:
[...]
| Should we have something similar for Rcpp ?
|
| #if defined(RCPP_VERSION)&&  RCPP_VERSION>= Rcpp_Version(0, 8, 5)
|         ...
| #endif

Sounds good to me!

Dirk

Great. I'll figure how to do it, unless someone else does it before me ...

BTW, why did you not reply to each question on its own thread ?

--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/bzoWrs : Rcpp svn revision 2000
|- http://bit.ly/b8VNE2 : Rcpp at LondonR, oct 5th
`- http://bit.ly/aAyra4 : highlight 0.2-2

_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to