Hi, How can I specify which functions should be exported when I build a shared library with 'R CMD SHLIB foo.c'?? I tried putting a file named foo.def in the same directory with the line 'EXPORTS' and the names of the functions to be exported, but the file is deleted in the build process. Any help is appreciated, Martin Keller-Ressel
What OS? If this is Windows, you cannot (and why do you want to, as the DLL is just to be loaded into R?). On Tue, 28 Sep 2004 martin at ist.org wrote:> How can I specify which functions should be exported when I build a > shared library with 'R CMD SHLIB foo.c'?? > I tried putting a file named foo.def in the same directory with the > line 'EXPORTS' and the names of the functions to be exported, but the > file is deleted in the build process.-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Yes it is Windows and I'm using a cygwin version of gcc to compile. I thought it would be 'cleaner' to have only the functions exported that are intended to be called from R. It is no big deal though, I just wondered if I'm using the wrong format for the .def file or making another simple mistake. I will also have another look at the R-ext manual like Jari suggested. Thanks for your help, Martin Keller-Ressel Am Tue, 28 Sep 2004 14:06:20 +0100 (BST) hat Prof Brian Ripley <ripley at stats.ox.ac.uk> geschrieben:> What OS? > > If this is Windows, you cannot (and why do you want to, as the DLLis> just > to be loaded into R?). > > On Tue, 28 Sep 2004 martin at ist.org wrote: > >> How can I specify which functions should be exported when I build a >> shared library with 'R CMD SHLIB foo.c'?? >> I tried putting a file named foo.def in the same directory with the >> line 'EXPORTS' and the names of the functions to be exported, butthe>> file is deleted in the build process. >--