\Header{library.dynam}{Loading Shared Libraries}
\alias{.Dyn.libs}{library.dynam}
\keyword{data}{library.dynam}
\begin{Description}\relax
Load the specified file of compiled code if it has not been loaded already.\end{Description}
\begin{Usage}
\begin{verbatim}
library.dynam(chname, package = .packages(), lib.loc = .lib.loc,
              verbose, file.ext, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{chname}] a character string naming a shared library to load.
\item[\code{package}] a character vector with the names of packages to search
through.
\item[\code{lib.loc}] a character vector describing the location of \R{}
library trees to search through.
\item[\code{verbose}] a logical value  indicating whether an announcement
is printed on the console before loading the shared library.
The default value is taken from the verbose entry in the system options.
\item[\code{file.ext}] the extension to append to the file name to specify
the library to be loaded. This defaults to the appropriate value
for the operating system.
\item[\code{...}] additional arguments needed by some libraries that
are passed to the call to \code{\Link{dyn.load}} to control
how the library is loaded.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This is designed to be used inside a
package rather than at the command line, and should really only be
used inside \code{\Link{.First.lib}()}.  The system-specific extension
for shared libraries
(e.g., \file{.so} or \file{.sl} on Unix systems)
should not be added.\end{Details}
\begin{Value}
The \code{.Dyn.libs} vector with the names of packages
which have used \code{library.dynam(..)} in the current \R{} session.

It is returned as \code{\Link{invisible}}, unless the \code{chname}
argument is missing.

Users should never set \code{.Dyn.libs} directly.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{.First.lib}}, \code{\Link{library}},
\code{\Link{dyn.load}}, \code{\Link{.packages}},
\code{\Link{.lib.loc}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
library.dynam()# which packages have been ``dynamically loaded''
\end{ExampleCode}
\end{Examples}

