[R-pkg-devel] Package building - compiling multiple dll files from within src directory

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri May 5 10:26:19 CEST 2017


Why do you want to build separate dll files if you want to load all of 
them anyway? That way you add some overhead, at least.


 From Writing R Extensions:

"A few packages use the src directory for purposes other than making a 
shared object (e.g. to create executables). Such packages should have 
files src/Makefile and src/Makefile.win (unless intended for only 
Unix-alikes or only Windows)."

Best,
Uwe Ligges



On 04.05.2017 17:09, Mark wrote:
> Hi,
>
> I am creating an R package with multiple c files within src directory.
> If possible, I would like to create separate dll files for each c file.
> Also I would like those dll files to have the same name as the input c
> files. i.e:
> mod01.c -o mod01.dll
> mod02.c -o mod02.dll
> mod03.c -o mod03.dll
> ...
>
> I could then load different dll files in the NAMESPACE:
> useDynLib("mod01")
> useDynLib("mod02")
> useDynLib("mod03")
> ...
>
> I don't know how can I set the MAKEVARS to do this correctly, and any
> suggestions would be much appreciated.
>
> Mark
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list