<div>Dear mailing list,</div><div><br></div><div>For a project I am working on speeding up a simulation in R by translating it to C++ (using inline and Rcpp). It is done and works fine on my windows 7 64bit R, but for some reason it is not working on my supervisors latest mac OSX (not sure of the version. should be up to date).</div>

<div><br></div><div>The strange thing is that it did work at first. It compiled and ran as expected. We then proceeded by changing a few things, resulting in the function not compiling anymore. When we then used exactly the same script as before it suddenly did not work anymore. I get these errors:</div>

<div><br></div><div><br></div><div>Error in compileCode(f, code, language = language, verbose = verbose) : </div><div>  Compilation ERROR, function(s)/method(s) not created! file345af547.cpp: In function ‘SEXPREC* file345af547(SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*)’:</div>

<div>file345af547.cpp:220: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:</div><div>/Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/include/Rcpp/sugar/operators/minus.h:421: note: candidate 1: Rcpp::sugar::Minus_Vector_Primitive&lt;RTYPE, NA, T&gt; operator-(const Rcpp::VectorBase&lt;RTYPE, NA, VECTOR&gt;&amp;, typename Rcpp::traits::storage_type&lt;RTYPE&gt;::type) [with int RTYPE = 14, bool NA = true, T = Rcpp::Vector&lt;14&gt;]</div>

<div>file345af547.cpp:220: note: candidate 2: operator-(SEXPREC*, int) &lt;built-in&gt;</div><div>file345af547.cpp:646: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:</div>

<div>/Library/Frameworks/R.framework/Versions/2.13/Resources/librar</div><div>In addition: Warning message:</div><div>running command &#39;/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file345af547.cpp 2&gt; file345af547.cpp.err.txt&#39; had status 1 </div>

<div><br></div><div>With relevant lines:</div><div><br></div><div> 220 : Demoplayers = Demoplayers - 1;</div><div><br></div><div> 646 : leeftijd = leeftijd + 1;</div><div><br></div><div>Demoplayers and leeftijd are both NumericVectors. Does anyone know if there is a common bug on MacOSX that for some reason makes the inline compiler not work anymore? The cxxfunction example works fine though.</div>

<div><br></div><div>Best,</div><div>Sacha</div>