[R] Checking and building package
Uwe Ligges
ligges at statistik.tu-dortmund.de
Fri Jun 3 22:32:59 CEST 2011
On 03.06.2011 21:46, Petar Milin wrote:
> Hello!
> I am truing to compile an R-package having c-code. I put foo.c in src/
> folder and useDynLib("foo")
Where "foo" is the name of your package, I hope.
Does R CMD INSTALL yourpackage generate a packagename.so (or .dll)? If
so, it is just the useSynLib() entry that fails. Or does R CMD INSTALL
give any error message?
Uwe Ligges
> in NAMESPACE file. When trying R CMD check,
> I got an error message that shared object 'foo' is not found. Then I did
> R CMD SHLIB foo.c first. However, after that, I got warnings from R CMD
> check that there is an object file in /src folder. Even worse is if I
> run R CMD SHLIB for Windows and for Linux and put in /src both foo.so
> and foo.dll.
> What I am doing wrong? I thought that only *.c is needed in src/, then,
> I read in someones advice that both the source and shared library must
> be in src/. What should be done if one wants to prepare for CRAN?
>
> Thanks!
>
> Best,
> Petar
>
More information about the R-help
mailing list