| CxxFlags | R Documentation |
CxxFlags() and LdFlags() return the flags needed to
compile and link C++ code against the Ceres Solver library that
is built and installed with this package. inlineCxxPlugin() is
the plugin used by sourceCpp when a source file
contains // [[Rcpp::depends(ceres)]].
CxxFlags(print = TRUE)
LdFlags(print = TRUE)
inlineCxxPlugin(...)
print |
if |
... |
ignored. |
In a package that uses Ceres, add ceres, RcppEigen and
Rcpp to LinkingTo and use the following in
src/Makevars:
CXX_STD = CXX17
PKG_LIBS = $(shell "${R_HOME}/bin/Rscript" -e "ceres::LdFlags()")
CxxFlags() and LdFlags() invisibly return the flags as a
character string. inlineCxxPlugin() returns a list of settings
for sourceCpp.
CxxFlags()
LdFlags()
if (requireNamespace("RcppEigen", quietly = TRUE)) {
Rcpp::sourceCpp(system.file("examples", "curve_fitting.cpp",
package = "ceres"),
env = new.env())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.