Re: [Rcpp-devel] Rcpp + Package -> undefined symbol

2017-08-02 Thread Sokol Serguei
Michaël Benesty has written at Wed, 2 Aug 2017 23:26:26 +0200 Thank you a lot Mr. Kou. The package is now compiling and I have updated it to load modules at loading of the package (was quite tricky). Just to understand, the .cc has compiled just because you moved them in src/ folder, am I right?

Re: [Rcpp-devel] Rcpp + Package -> undefined symbol

2017-08-02 Thread Michaël BENESTY
Thank you a lot Mr. Kou. The package is now compiling and I have updated it to load modules at loading of the package (was quite tricky). Just to understand, the .cc has compiled just because you moved them in src/ folder, am I right? The -I flag in Makevars was not enough? Kind regards, Michaël _

Re: [Rcpp-devel] Rcpp + Package -> undefined symbol

2017-08-02 Thread Qiang Kou
Hi, Michael, All the ".cc" files need to be compiled to make your package work. Putting them in the inst/include folder is not enough. I made some quick changes in your package and please check the attachment. Best, Qiang Kou On Wed, Aug 2, 2017 at 11:22 AM, Michaël BENESTY wrote: > Hi, > >

Re: [Rcpp-devel] Rcpp + Package -> undefined symbol

2017-08-02 Thread Dirk Eddelbuettel
On 2 August 2017 at 21:02, Michaël BENESTY wrote: | Thank you Dirk for this answer. | | The source code of Fasttext is already embedded in the package (it is | the content of ../inst/include/ and is linked with PKG_CPPFLAGS + | include of headers). | So no issue with user having it or needing to

Re: [Rcpp-devel] Rcpp + Package -> undefined symbol

2017-08-02 Thread Michaël BENESTY
Thank you Dirk for this answer. The source code of Fasttext is already embedded in the package (it is the content of ../inst/include/ and is linked with PKG_CPPFLAGS + include of headers). So no issue with user having it or needing to link with PKG_LIBS. I have checked the compilation with this M

Re: [Rcpp-devel] Rcpp + Package -> undefined symbol

2017-08-02 Thread Dirk Eddelbuettel
On 2 August 2017 at 20:22, Michaël BENESTY wrote: | Hi, | | 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 che

Re: [Rcpp-devel] return Colvec as vector

2017-08-02 Thread Dirk Eddelbuettel
On 1 August 2017 at 18:54, Sokol Serguei wrote: | > If other wants to chime in: https://github.com/RcppCore/RcppArmadillo/pull/151 | ... and now with unit tests and comments in RcppArmadilloConfig.h: | https://github.com/RcppCore/RcppArmadillo/pull/154 And #151 and #154 are now in the master br

[Rcpp-devel] Rcpp + Package -> undefined symbol

2017-08-02 Thread Michaël BENESTY
Hi, 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.