R: Compile a .dll/.so from source.

compile_dll {pkgbuild} | R Documentation

## Compile a .dll/.so from source.

### Description

`compile_dll` 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 `compiler_flags(TRUE)`.

### Usage

    compile_dll(path = ".", force = FALSE,
      compile_attributes = pkg_links_to_rcpp(path),
      register_routines = FALSE, quiet = FALSE)

### Arguments

`path` | Path to a package, or within a package.
`force` | If `TRUE`, for compilation even if `needs_compile()` is `FALSE`.
`compile_attributes` | if `TRUE` and the package uses Rcpp, call `Rcpp::compileAttributes()` before building the package. It is ignored if package does not need compilation.
`register_routines` | if `TRUE` and the package does not use Rcpp, call register routines with `tools::package_native_routine_registration_skeleton()` before building the package. It is ignored if package does not need compilation.
`quiet` | if `TRUE` suppresses output from this function.

### Details

Invisibly returns the names of the DLL.

### Note

If this is used to compile code that uses Rcpp, you will need to add the following line to your `Makevars` file so that it knows where to find the Rcpp headers: `PKG_CPPFLAGS=`$(R_HOME)/bin/Rscript -e 'Rcpp:::CxxFlags()'“

### See Also

`clean_dll()` to delete the compiled files.

[Package pkgbuild version 1.0.2 Index]