\HeaderA{sourceC}{Compiles and loads C source code}{sourceC}
\methaliasA{sourceC.default}{sourceC}{sourceC.default}
\keyword{programming}{sourceC}
\begin{Description}\relax
Compiles and loads C source code.
\end{Description}
\begin{Usage}
\begin{verbatim}## Default S3 method:
sourceC(filename, ...)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{filename}] The filename of the library to compile.
\item[\code{...}] Arguments passed to \code{compile()} of the
\code{\LinkA{NativeCode}{NativeCode}} class.
\end{ldescription}
\end{Arguments}
\begin{Value}
Returns nothing.
\end{Value}
\begin{Author}\relax
Henrik Bengtsson (\url{http://www.braju.com/R/})
\end{Author}
\begin{Examples}
\begin{ExampleCode}
filename <- "hello.c";

if (!isFile(filename)) {
  path <- system.file("code", package="R.native");
  file.copy(file.path(path, filename), filename);
}

# Compile the source code
sourceC(filename);

# Call the function
.C("hello")
\end{ExampleCode}
\end{Examples}

