Vaclav,

1)  I already told you not to use "include" without the gsl/ layer. Don't do
    that. It will bite you eventually when other GSL headers (with a
    hardcoded gsl/) try to call each other.

    This is a convention the upstream developers chose. Stick with it, or
    risk obscure bugs.

2)  I already told you about the existing plugin and its use of -I flags. Run
    the following:

    library(inline)

    fun <- cxxfunction(signature(), plugin="RcppGSL", verbose=TRUE, body='
        int answer = 42;
        return Rcpp::wrap(answer);
    ')

    and you should see


     >> setting environment variables: 
    PKG_LIBS = -L/usr/lib -lgsl -lgslcblas -lm $(LAPACK_LIBS) $(BLAS_LIBS) 
$(FLIBS) -L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp 
-Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib
    PKG_CPPFLAGS = -I/usr/include
    
     >> LinkingTo : RcppGSL, Rcpp
    CLINK_CPPFLAGS =  -I"/usr/local/lib/R/site-library/RcppGSL/include" 
-I"/usr/local/lib/R/site-library/Rcpp/include" 


    [...]
    
    Compilation argument:
     /usr/lib/R/bin/R CMD SHLIB file6de9438a5047.cpp 2> 
file6de9438a5047.cpp.err.txt 
    g++-4.6 -I/usr/share/R/include -DNDEBUG -I/usr/include
     -I"/usr/local/lib/R/site-library/RcppGSL/include"
     -I"/usr/local/lib/R/site-library/Rcpp/include"   -fpic  -g -O0 -Wall -c
     file6de9    438a5047.cpp -o file6de9438a5047.o
    g++-4.6 -shared -o file6de9438a5047.so file6de9438a5047.o -L/usr/lib
     -lgsl -lgslcblas -lm -llapack -lblas -lgfortran -lm -lquadmath
     -L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp 
-Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/lib/R/lib -lR

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com  
_______________________________________________
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