Darren Cook <dar...@dcook.org> wrote: >> I've run into a problem with the RInside "hello world" > example. I can >> not get it to compile on my system. The first of the many error >> messages is: >> >> undefined reference to `RInside::RInside(int, char const* const*, bool) > > You are not telling g++ where to find the R libraries that you need to > link with. > > I've a similar basic RInside example and I've got a comment in the > header that says compile it with this: > > g++ -I/usr/local/lib/R/site-library/Rcpp/include > -I/usr/local/lib/R/site-library/RInside/include -I/usr/share/R/include > -L/usr/lib64/R/lib -lR -L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp > -L/usr/local/lib/R/site-library/RInside/lib -lRInside > -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -lRInside > -Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib main.cpp > > > You may have to adjust the paths (I'm on ubuntu 10.04, and I think > default locations for all R packages), but it gives you an idea of what > you're missing.
Thanks, Darren. I think that must be the issue. I'll try adding the additional include/library directories later today. For the record, it occurred to me that I didn't include any R, Rcpp, or RInside information in my original post. I've appended it below. -- Mike $ R --vanilla R version 2.15.0 (2012-03-30) Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-redhat-linux-gnu (64-bit) > library(help=Rcpp) [...] Package: Rcpp Title: Seamless R and C++ Integration Version: 0.9.9 > library(help=RInside) [...] Package: RInside Title: C++ classes to embed R in C++ applications Version: 0.2.6 _______________________________________________ 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