Skip to content
Back to formatted view

Raw Message

Message-ID: <CANnL8grG2x+v8O7Y+FKrsYKG1LS0Z9tjAHeLsDRhR0HkKQ991Q@mail.gmail.com>
Date: 2017-03-30T20:06:30Z
From: Tim Keitt
Subject: [Rcpp-devel] Question regarding new pacakge registration requirements
In-Reply-To: <CAL6gwnLuftkhBwvjL9Q1Q_gqjvHxb6XUNgQK9hMYQToaf8EKaQ@mail.gmail.com>

On Thu, Mar 30, 2017 at 2:55 PM, Avraham Adler <avraham.adler at gmail.com>
wrote:

> If so, do I add
> them asa regards the functions *I* wrote in lamw.cpp or as regards the
> function wrappers that Rcpp wrote and the .R files call in
> RcppExports.R?
>

I'm a bit confused about this as well. My impression is that the only
reason to register functions is so that *other* packages can call them. If
you do not want to make them available, you don't need to register them. Or
I could have that complete wrong.

THK

If you don't want to register anything, this snippet placed in init.c will
get you past CRAN checks currently:

#include <R.h>
#include <Rinternals.h>
#include <R_ext/Rdynload.h>
R_CallMethodDef callMethods[] = {{NULL, NULL, 0}};
R_CMethodDef cMethods[] = {{NULL, NULL, 0}};
void
R_init_myLib(DllInfo *info)
{
R_registerRoutines(info, cMethods, callMethods, NULL, NULL);
R_useDynamicSymbols(info, FALSE);
}
http://www.keittlab.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20170330/32c5c920/attachment.html>