[Rd] Getting 'LinkingTo' to find the right library

From: <Setzer.Woodrow_at_epamail.epa.gov>
Date: Mon, 02 Feb 2009 15:39:21 -0500

I am experimenting with exporting pointers to some of the functions in deSolve so that other packages may import them, using the
'R_RegisterCCallable' mechanism. I have added a header file and some
other C code in inst/include of the deSolve source package that need to be accessible to other packages. I have a site-library set up in Rprofile.site where all installed packages go, and as long as my experimental version of deSolve is installed there, I'd like to install my modified copy of deSolve in a test library. However, when I try to install my test package (which includes both Depends: deSolve and LinkingTo: deSolve, in its Description file, as described in 'R Extensions'), compilation fails, because the appropriate C code cannot be found (there is also an unrelated problem in deSolve_stubs.c triggering the "unexpected ')' before '*' token" error).

[test]$ R CMD INSTALL -l C:/home/Rlib-test dma

Removing 'C:/home/Rlib-test/dma'

It seems that although the 'site-library/deSolve/include' folder is included in the search list for included files, the
'Rlib-test/deSolve/include' folder is not. The folder that includes
both the experimental version of deSolve and the test package dma also contains a .Rprofile file which places 'C:/home/Rlib-test' at the front of the library search path, and I have confirmed that this is so (in fact, the above INSTALL command does not need the '-l ' argument; the default install location is Rlib-test for installs from this folder). It looks as if the code in INSTALL that sets up the -I arguments to gcc does not find the library path defined for this folder. Can someone point me to the right way to do this?

System information:
Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = Patched
 major = 2
 minor = 8.1
 year = 2009
 month = 01
 day = 04
 svn rev = 47474
 language = R
 version.string = R version 2.8.1 Patched (2009-01-04 r47474)

Windows XP (build 2600) Service Pack 2

Locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

Search Path:
 .GlobalEnv, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, package:methods, Autoloads, package:base
R. Woodrow Setzer, Ph. D.
National Center for Computational Toxicology http://www.epa.gov/comptox
US Environmental Protection Agency
Mail Drop B205-01/US EPA/RTP, NC 27711
Ph: (919) 541-0128 Fax: (919) 541-1194



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 02 Feb 2009 - 20:43:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 02 Feb 2009 - 22:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive