\HeaderA{COMPILE}{Compile Files for Use with R}{COMPILE}
\keyword{utilities}{COMPILE}
\begin{Description}\relax
Compile given source files so that they can subsequently be collected
into a shared library using \code{R CMD SHLIB} and be loaded into R
using \code{dyn.load()}.
\end{Description}
\begin{Usage}
\begin{verbatim}R CMD COMPILE [options] srcfiles\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{srcfiles}] A list of the names of source files to be compiled.
Currently, C, C++ and FORTRAN are supported; the corresponding files
should have the extensions \file{.c}, \file{.cc} (or \file{.cpp} or
\file{.C}), and \file{.f}, respectively.
\item[\code{options}] A list of compile-relevant settings, such as special
values for \code{CFLAGS} or \code{FFLAGS}, or for obtaining
information about usage and version of the utility.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Note that Ratfor is not supported.  If you have Ratfor source code,
you need to convert it to FORTRAN.  On many Solaris systems mixing
Ratfor and FORTRAN code will work.
\end{Details}
\begin{Note}\relax
Some binary distributions of \R{} have \code{COMPILE} in a separate
bundle, e.g. an \code{R-devel} RPM.
\end{Note}
\begin{SeeAlso}\relax
\code{\LinkA{SHLIB}{SHLIB}},
\code{\LinkA{dyn.load}{dyn.load}};
the section on \dQuote{Customizing compilation under Unix} in
\dQuote{R Administration and Installation}
(see the \file{doc/manual} subdirectory of the \R{} source tree).
\end{SeeAlso}

