On 22 May 2012 at 01:04, Michael Hannon wrote:
| 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.

Correct -- the RInside package comes with four example directories.

And each of these four directories has a Makefile.  The easiest to start with is

   examples/standard/Makefile

as you can simply drop in a new file 'myhelloworld.cpp' (or any other name
you choose) into this directory and say 'make myhelloworld' --- and the
binary 'myhelloworld' will be created for you.

It does this by querying R via Rscript to learn about 

   headers and libraries for R

   headers and libraries for Rcpp

   headers and libraries for RInside

and all six components are needed for compiling and linking.  

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