[Rcpp-devel] Rcpp + Package -> undefined symbol
edd at debian.org
Wed Aug 2 20:32:34 CEST 2017
On 2 August 2017 at 20:22, Michaël BENESTY wrote:
| I am trying to wrap the Fasttext lib from Facebook on R.
| I have wrote a minimal code based on Rcpp.package.skeleton(module = TRUE)
| The C++ file compiles/works with sourceCpp() but it crashes when
| building a package.
| I have checked many D. Eddelbuettel to get a clue of what to do but no luck.
| I have already setup a Makevars file with a path to the include folder.
| The package source code is available there:
| My Makevars:
| CXX_STD = CXX11
| ROOT_INCLUDE = ../inst/include/
If this is a library then you need to __link__ to it as well. That is
commonly done via PKG_LIBS=... and it may get you the additional problem of
having to ensure users of your package have the fastText library installed.
| The error I am seeing:
| ==> R CMD INSTALL --preclean --no-multiarch --with-keep.source FastRText
| Error: package or namespace load failed for ‘FastRText’ in
| dyn.load(file, DLLpath = DLLpath, ...):
| impossible de charger l'objet partagé
| undefined symbol: _ZN8fasttext8FastTextC1Ev
| The full log is available there:
| According to c++filt
| undefined symbol: _ZN8fasttext8FastTextC1Ev means ->
| Has anyone an idea?
| Kind regards,
| Michaël BENESTY
| michael at benesty.fr
| Please do not print this e-mail unless you really need to.
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel