Ok, I found the 'scrm' Rcpp package: here the file scrmr.cpp provides an interface for calling the scrm C++ application from R. following their solution, I modified my Makevars file, adding:

OBJECTS.PnuChart = ngraph.o RcppExports.o
OBJECTS.PnuChart = PnuChart/Finder.o
OBJECTS = $(OBJECTS.PnuChart)

Now the linker finds the object files and knows where functions "are". so, previous error is solved.

but loading still fails with the following message:

/home/fabio/R/x86_64-pc-linux-gnu-library/3.0/NgrapH/libs/NgrapH.so: undefined symbol: gsl_vector_alloc
Error: loading failed

In fact, I do use gsl, that's why I added RcppGSL in the DESCRIPTION file at 'LinkingTo'. Also, I use the attribute '// [[Rcpp::depends(RcppGSL)]]' in those headers where GSL functions are used, and included <RcppGSL.h>. I do not export those functions because they're not called directly from R.

still, I get the loading failed error.


Fabio





On 05/05/2015 10:15 PM, Dirk Eddelbuettel wrote:

On 5 May 2015 at 16:28, Fabio Tordini wrote:
| Here is the actual (simple) code:
|
|       Finder *f = new Finder();
|       f->parseFiles(str_g, str_f, str_s);

So where is Finder implemented?

The computer tells you that you want to use it, but don't supply it.

Dirk

_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to