Dear list,<div><br></div><div>I am planning to use Stan through R which requires using Rcpp package and C++ compiler. I am not familiar with C++. I have been trying to install necessary packages and tools. I followed the steps given at this website:</div>
<div><a href="http://tonybreyal.wordpress.com/2011/12/07/installing-rcpp-on-windows-7-for-r-and-c-integration/">http://tonybreyal.wordpress.com/2011/12/07/installing-rcpp-on-windows-7-for-r-and-c-integration/</a></div><div>
<br></div><div>There is an example code on that website. I tried to run it many times. I failed at each attempts. I have spent hours and googled but could not get it run. Could you please help me solve this problem based on the code and error below.</div>
<div><br></div><div><div># install packages</div><div>install.packages(c("Rcpp", "rbenchmark", "inline", "RUnit"))</div><div><br></div><div># load main two packages</div><div>library(Rcpp)</div>
<div>library(inline)</div><div><br></div><div># do something with Rcpp to quickly check that it works</div><div>body <- '</div><div>NumericVector xx(x);</div><div>return wrap( std::accumulate( xx.begin(), xx.end(), 0.0));'</div>
<div><br></div><div>add <- cxxfunction(signature(x = "numeric"), body, plugin = "Rcpp")</div><div><br></div><div><b><u>ERROR:</u></b></div><div><br></div><div><br></div><div><div>cygwin warning:</div>
<div>  MS-DOS style path detected: C:/R/etc/x64/Makeconf</div><div>  Preferred POSIX equivalent is: /cygdrive/c/R/etc/x64/Makeconf</div><div>  CYGWIN environment variable option "nodosfilewarning" turns off this warning.</div>
<div>  Consult the user's guide for more details about POSIX paths:</div><div>    <a href="http://cygwin.com/cygwin-ug-net/using.html#using-pathnames">http://cygwin.com/cygwin-ug-net/using.html#using-pathnames</a></div>
<div>filee3865715ed2.cpp:1: sorry, unimplemented: 64-bit mode not compiled in</div><div>filee3865715ed2.cpp:1: error: bad value (core2) for -mtune= switch</div><div>make: *** [filee3865715ed2.o] Error 1</div><div><br></div>
<div>ERROR(s) during compilation: source code errors or compiler configuration errors!</div><div><br></div><div>Program source:</div><div>  1: </div><div>  2: // includes from the plugin</div><div>  3: </div><div>  4: #include <Rcpp.h></div>
<div>  5: </div><div>  6: </div><div>  7: #ifndef BEGIN_RCPP</div><div>  8: #define BEGIN_RCPP</div><div>  9: #endif</div><div> 10: </div><div> 11: #ifndef END_RCPP</div><div> 12: #define END_RCPP</div><div> 13: #endif</div>
<div> 14: </div><div> 15: using namespace Rcpp;</div><div> 16: </div><div> 17: </div><div> 18: // user includes</div><div> 19: </div><div> 20: </div><div> 21: // declarations</div><div> 22: extern "C" {</div><div>
 23: SEXP filee3865715ed2( SEXP x) ;</div><div> 24: }</div><div> 25: </div><div> 26: // definition</div><div> 27: </div><div> 28: SEXP filee3865715ed2( SEXP x ){</div><div> 29: BEGIN_RCPP</div><div> 30: </div><div> 31: NumericVector xx(x);</div>
<div> 32: return wrap( std::accumulate( xx.begin(), xx.end(), 0.0));</div><div> 33: END_RCPP</div><div> 34: }</div><div> 35: </div><div> 36: </div><div>Error in compileCode(f, code, language = language, verbose = verbose) : </div>
<div>  Compilation ERROR, function(s)/method(s) not created! cygwin warning:</div><div>  MS-DOS style path detected: C:/R/etc/x64/Makeconf</div><div>  Preferred POSIX equivalent is: /cygdrive/c/R/etc/x64/Makeconf</div><div>
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.</div><div>  Consult the user's guide for more details about POSIX paths:</div><div>    <a href="http://cygwin.com/cygwin-ug-net/using.html#using-pathnames">http://cygwin.com/cygwin-ug-net/using.html#using-pathnames</a></div>
<div>filee3865715ed2.cpp:1: sorry, unimplemented: 64-bit mode not compiled in</div><div>filee3865715ed2.cpp:1: error: bad value (core2) for -mtune= switch</div><div>make: *** [filee3865715ed2.o] Error 1</div><div>In addition: Warning message:</div>
<div>running command 'C:/R/bin/x64/R CMD SHLIB filee3865715ed2.cpp 2> filee3865715ed2.cpp.err.txt' had status 1 </div><div>> </div></div><div><br></div><div><br></div><div>I am using Windows-64 bit. On my previous run, I also got an error like <b style="color:rgb(51,51,51);font-family:Verdana;font-size:12px;line-height:18px;background-color:rgb(255,255,255)">"Cygwin1.dll Not Found". </b><span style="color:rgb(51,51,51);font-family:Verdana;font-size:12px;line-height:18px;background-color:rgb(255,255,255)">In order to fix this I reinstalled the Cygwin but it did not work. Now I am getting the long error listed above.</span></div>
<div><span style="color:rgb(51,51,51);font-family:Verdana;font-size:12px;line-height:18px;background-color:rgb(255,255,255)"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Verdana;font-size:12px;line-height:18px;background-color:rgb(255,255,255)"><br>
</span></div><div><span style="color:rgb(51,51,51);font-family:Verdana;font-size:12px;line-height:18px;background-color:rgb(255,255,255)">I am also adding what seems on my PATH </span></div><div><span style="background-color:rgb(255,255,255);font-size:12px;line-height:18px"><font color="#333333" face="Verdana">C:\R\batchfiles_0.6-6;C:\R\Rtools\bin;C:\R\Rtools\MinGW\bin;C:\cygwin\bin</font></span></div>
<div><span style="background-color:rgb(255,255,255);font-size:12px;line-height:18px"><font color="#333333" face="Verdana"><br></font></span></div><div><span style="background-color:rgb(255,255,255);font-size:12px;line-height:18px"><font color="#333333" face="Verdana"><br>
</font></span></div><div><span style="color:rgb(51,51,51);font-family:Verdana;font-size:12px;line-height:18px;background-color:rgb(255,255,255)">Any suggestion?</span></div><div><br></div>-- <br><i><span style="font-family:georgia,serif">Sedat</span><span style="font-family:georgia,serif"><br>
</span><span style="font-family:georgia,serif"></span></i>
</div>