From mdowle at mdowle.plus.com  Tue Jun 12 10:57:01 2012
From: mdowle at mdowle.plus.com (Matthew Dowle)
Date: Tue, 12 Jun 2012 09:57:01 +0100
Subject: [Rd] How to change name of .so/.dll
Message-ID: <2423c6e3a75c2c74b2854cf43d38c4c5.squirrel@webmail.plus.net>


Hi,

I've added R_init_data_table to the "data.table" package (which has a dot
in its name). This works well in R 2.15.0, because of this from the
Writing R Extensions manual :

" Note that there are some implicit restrictions on this mechanism as the
basename of the DLL needs to be both a valid file name and valid as part
of a C entry point (e.g. it cannot contain ?.?): for portable code it is
best to confine DLL names to be ASCII alphanumeric plus underscore. As
from R 2.15.0, if entry point R_init_lib is not found it is also looked
for with ?.? replaced by ?_?. "

But how do I confine the DLL name, is it an option in Makevars?

The name of the shared object is currently "data.table.so" (data.table.dll
on Windows).  Is it possible to change the file name to "datatable.so"
(and datatable.dll) in a portable way so that R_init_datatable works
(without a dot), and, without Depend-ing on R>=2.15.0 and without changing
the name of the package?

Thanks,
Matthew



[Rd] How to change name of .so/.dll
Matthew Dowle