Reputation: 518
When I run devtools::document()
on my R package (which includes C++ code), I get multiple errors of the type
C:/Users/Lennart/Documents/R/win-library/4.0/RcppArmadillo/include/armadillo_bits/translate_lapack.hpp:1247: undefined reference to `ilaenv_'
Do you have any idea how to fix this?
Upvotes: 0
Views: 123
Reputation: 368261
This is an incomplete question---we have no code to go by, and have no idea how you set your package up.
Note that for RcppArmadillo
you must use the snippets provided here (and automatically included by RcppArmadillo.package.skeleton()
) in order to get the correct files src/Makevars
and src/Makevars.win
which have
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
which ensures working OpenMP (if R has it on the architecture) and working LAPACK / BLAS.
Upvotes: 2
Reputation: 11791
Make sure you have all dependencies installed (LAPACK is an external library for linear algebra, perhaps you need to install some collection of development packages). It might also mean that you've got some dependency in a wrong (outdated? too new?) version.
What exact environment is this? What exact versions of the relevant packages?
Upvotes: 1