[R] Checking and building package

Petar Milin pmilin at ff.uns.ac.rs
Fri Jun 3 21:46:39 CEST 2011


Hello!
I am truing to compile an R-package having c-code. I put foo.c in src/ 
folder and useDynLib("foo") 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

-- 
#####################################################################################
Petar Milin
Department of Psychology, University of Novi Sad, Serbia
  &
Laboratory for Experimental Psychology, University of Belgrade, Serbia

Address:   Dr Zorana Dindica 2, Novi Sad 21000, Serbia
E-mail:    pmilin<AT>  ff.uns.ac.rs
Tel.&Fax:  +381 21 458 948

Official homepage (in Serbian):
http://www.ff.uns.ac.rs/fakultet/ljudi/fakultet_odseci_psihologija_petar_milin.html

Personal homepage:
http://sites.google.com/site/pmilin/
#####################################################################################



More information about the R-help mailing list