From jhallman at frb.gov  Fri Dec  8 15:40:14 2006
From: jhallman at frb.gov (jhallman at frb.gov)
Date: Fri, 08 Dec 2006 09:40:14 -0500
Subject: [Rd] dyn.load and function calls without 'PACKAGE' argument
Message-ID: <20061208144014.9517A5362E@mail.rsma.frb.gov>

I'm writing a package that interfaces to the FAME database, via a
library of compiled C routines accessible through a Linux .so file.  My
.onLoad() function loads the .so like this:

dyn.load("/opt/fame/timeiq/lib/linux_x86/libjchli.so", local = F)

and after that I also load my own fame.so via

library.dynam("fame", package = "fame")

The code in fame.so uses functions found in libjchli.so, making the
'local = F' argument in dyn.load() necessary.  But since Fame symbols
are found in libjchli.so, which is NOT part of my package, I can't, for
example, do this:

.C("cfmfin", status = integer(1), PACKAGE = "fame")

since the PACKAGE argument tells R to look only in fame.so for symbols.
Instead, I have to do it without specifying 'PACKAGE', i.e., 

.C("cfmfin", status = integer(1))

This works, but 'R CMD check' complains: 

"Foreign function calls without 'PACKAGE' argument:"

followed by a list of the functions called from libjchli.so.

Is there a way to make R CMD check happy here?

Jeff



[Rd] dyn.load and function calls without 'PACKAGE' argument
jhallman at frb.gov