[Rcpp-devel] Problems on a new Mac

Sacha Epskamp sacha.epskamp at gmail.com
Mon Jan 30 18:42:10 CET 2012


Last year I have written some functions for my then supervisor using
Rcpp and inline, which worked fine. Recently my supervisor got a new
Mac, and the functions don't work anymore.

After some trying I found at least one thing that wasn't working
properly. As an example see this function:

library("inline")
library("Rcpp")

fun <-cxxfunction(, '
NumericVector foo(3,1.0);
return wrap(foo);
',plugin="Rcpp")

fun()

This returns the vector (1,1,1) for me, but numeric(0) for my
supervisor (compiling seems to go fine and functions work with objects
like double). I have no idea what is going wrong. I realize this is
probably a very system-specific problem that is hard to "fix" through
mail, but I am hoping that you might have some ideas on what might go
wrong or a place to start.

Below are some system specifications.

Best,
Sacha Epskamp

system("g++ --version")
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc.
build 5658) (LLVM build 2336.1.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

> R.version
               _
platform       x86_64-apple-darwin9.8.0
arch           x86_64
os             darwin9.8.0
system         x86_64, darwin9.8.0
status
major          2
minor          14.1
year           2011
month          12
day            22
svn rev        57956
language       R
version.string R version 2.14.1 (2011-12-22)
> packageDescription("Rcpp")$Version
[1] "0.9.9"


More information about the Rcpp-devel mailing list