Rev 230 | Rev 5538 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{dyn.load}\title{Foreign Function Interface}\usage{dyn.load(libname)is.loaded(symbol)symbol.C(name)symbol.For(name)}\alias{dyn.load}\alias{is.loaded}\alias{symbol.C}\alias{symbol.For}\arguments{\item{libname}{a character string giving the pathname to a DLL.}\item{symbol}{a character string giving a symbol name.}\item{name}{a character string giving either the name of a Cfunction or Fortran subroutine.}}\value{The function \code{dyn.load} is used for its side effect whichlinks the specified shared library to the executing \R image.Calls to \code{.C} and \code{.Fortran} can then be used to executeC functions or Fortran subroutines contained in the library.}\note{The creation of shared libraries the runtime linking of theminto executing programs is very platform dependent.In recent years there has been some simplification in the processbecause the C subroutine call \code{dlopen} has become the standardfor doing this under Unix.\code{dyn.load} uses the \code{dlopen} mechanism andshould work on all platforms which support it.The original code for loading DLLs in UNIXwas provided by Heiner Schwarte.The compatibility code for HP-UX was provided by Luke Tierney.}\seealso{\code{\link{.C}}, \code{\link{.Fortran}}.}\examples{is.loaded(symbol.For("hcass2")) #-> probably FALSElibrary(mva)is.loaded(symbol.For("hcass2")) #-> TRUE}\keyword{interface}