[Rprotobuf-yada] linking against R shared library
Dirk Eddelbuettel
edd at debian.org
Sat Nov 7 15:37:38 CET 2009
On 7 November 2009 at 06:31, Dirk Eddelbuettel wrote:
| On 7 November 2009 at 10:51, Romain Francois wrote:
| | Hello,
| |
| | I'm trying to use the limited connection api using R_outpstream_st that
| | is defined in Rinternals.h
| |
| | I have code that looks like this (trimmed of do_serializeToConn) :
| |
| | Rconnection con ;
| | struct R_outpstream_st out;
| | R_pstream_format_t type = R_pstream_binary_format ;
| | SEXP (*hook)(SEXP, SEXP) = NULL ;
| | con = getConnection(Rf_asInteger(connection));
| | R_InitConnOutPStream(&out, con, type, 0, hook, R_NilValue );
| |
| |
| | The issue I have at the moment is with the call to "getConnection", so I
| | was trying to do things like this :
| |
| | #ifndef LibExtern
| | #define LibExtern extern
| | #endif
| | LibExtern Rconnection getConnection(int);
| |
| | but for this I think we need to link against the R shared lib ? Do you
| | know how to do this.
|
| Yes because projects like littler or RInside do it to embed all of R.
|
| But here we build a loadable module for R -- can it really link to R itself
| when it is loaded into R?
Saw your r-devel post too. Not sure we can do this if the API "seals it"
away from us. When did Jeff post about exposing connections?
Dirk
--
Three out of two people have difficulties with fractions.
More information about the Rprotobuf-yada
mailing list