EVOLUTION-MANAGER
Edit File: compile_dll.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Compile a .dll/.so from source.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for compile_dll {pkgbuild}"><tr><td>compile_dll {pkgbuild}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Compile a .dll/.so from source.</h2> <h3>Description</h3> <p><code>compile_dll</code> performs a fake R CMD install so code that works here should work with a regular install (and vice versa). During compilation, debug flags are set with <code><a href="compiler_flags.html">compiler_flags</a>(TRUE)</code>. </p> <h3>Usage</h3> <pre> compile_dll( path = ".", force = FALSE, compile_attributes = pkg_links_to_cpp11(path) || pkg_links_to_rcpp(path), register_routines = FALSE, quiet = FALSE, debug = TRUE ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>path</code></td> <td> <p>Path to a package, or within a package.</p> </td></tr> <tr valign="top"><td><code>force</code></td> <td> <p>If <code>TRUE</code>, for compilation even if <code><a href="needs_compile.html">needs_compile()</a></code> is <code>FALSE</code>.</p> </td></tr> <tr valign="top"><td><code>compile_attributes</code></td> <td> <p>if <code>TRUE</code> and the package uses Rcpp, call <code><a href="../../Rcpp/html/compileAttributes.html">Rcpp::compileAttributes()</a></code> before building the package. It is ignored if package does not need compilation.</p> </td></tr> <tr valign="top"><td><code>register_routines</code></td> <td> <p>if <code>TRUE</code> and the package does not use Rcpp, call register routines with <code>tools::package_native_routine_registration_skeleton()</code> before building the package. It is ignored if package does not need compilation.</p> </td></tr> <tr valign="top"><td><code>quiet</code></td> <td> <p>if <code>TRUE</code> suppresses output from this function.</p> </td></tr> <tr valign="top"><td><code>debug</code></td> <td> <p>If <code>TRUE</code>, and if no user Makevars is found, then the build runs without optimisation (<code>-O0</code>) and with debug symbols (<code>-g</code>). See <code><a href="compiler_flags.html">compiler_flags()</a></code> for details. If you have a user Makevars (e.g., <code style="white-space: pre;">~/.R/Makevars</code>) then this argument is ignored.</p> </td></tr> </table> <h3>Details</h3> <p>Invisibly returns the names of the DLL. </p> <h3>Note</h3> <p>If this is used to compile code that uses Rcpp, you will need to add the following line to your <code>Makevars</code> file so that it knows where to find the Rcpp headers: <code style="white-space: pre;">PKG_CPPFLAGS=</code>$(R_HOME)/bin/Rscript -e 'Rcpp:::CxxFlags()'“ </p> <h3>See Also</h3> <p><code><a href="clean_dll.html">clean_dll()</a></code> to delete the compiled files. </p> <hr /><div style="text-align: center;">[Package <em>pkgbuild</em> version 1.3.1 <a href="00Index.html">Index</a>]</div> </body></html>