I am trying to write a C++ function to be called from R and have never done
this before.  I have done the following:
require(Rcpp)
require(inline)
src <- 'blahblahblah'
fun <- cxxfunction(signature(a="numeric",b="numeric"),src,plugin="Rcpp")

That last line generates the error message:

Error in compileCode(f, code, language = language, verbose = verbose) :
  Compilation ERROR, function(s)/method(s) not created!
In addition: Warning message:
running command 'C:/PROGRA~1/R/R-215~1.1/bin/i386/R CMD SHLIB
file26476eb7fd0.cpp 2> file26476eb7fd0.cpp.txt' had status 1

I am assuming that I don't have the necessary compiler installed on my
machine.  I tried installing Rtools, which created a C:/Rtools/ directory
with the files, but I am not sure if my R software knows how to properly
access it.  I was advised to make sure my path is set correctly, but wasn't
sure which path--my library search path in R, my Rtools installation
setting for "PATH", my "PATH" in DOS, or what.

I am operating on Windows 7.

I would greatly appreciate some instructions on how to set this up.  All
the manuals and posts seem to gloss over the details of setting up the C++
compiler (I have looked at The Art of R Programming, and also the
R-admin.pdf file, among other sources).  I assume it is something that can
be done in 5 minutes, if I only knew how ...

Thanks.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to