[R] linking C/C++ external libraries.

Jarrod Hadfield J.Hadfield at ed.ac.uk
Mon Dec 3 15:54:29 CET 2007


Hi Everyone,

I'm trying to load some C++ code using dyn.load but I'm getting  
unresolved symbols associated with some external libraries  
(CSparse).  I gather this is something to do with linking as the the  
code compiles fine.  However, I've passed

-L/home/jarrod/My_Programs/SuiteSparse/CSparse/Lib -lcsparse

to the complier (g++), either directly using R CMD SHLIB or as  
PKG_LIBS in a Makevars file, and I cannot resolve the problem.  I'm  
working with R 2.6.0 on fedora 6

Any help would be appreciated.

Thanks,

Jarrod



More information about the R-help mailing list