Sorry it was not en error but warning! I could get the same results as in that website. <div><br></div><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>> </div><div>> add <- cxxfunction(signature(x = "numeric"), body, plugin = "Rcpp")</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>> </div><div>> x <- 1</div><div>> y <- 2</div><div>> res <- add(c(x, y))</div><div>> res</div><div>[1] 3</div><div><br></div><div><br></div><div>Do you think this warning is a problem and should be fixed/can be fixed?</div>
<div><br></div><div>Best,</div><div><br></div><div>Sedat</div><br><div class="gmail_quote">On Fri, Mar 8, 2013 at 2:13 AM, Sedat Sen <span dir="ltr"><<a href="mailto:sedatsen06@gmail.com" target="_blank">sedatsen06@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Kevin,<div><br></div><div>Thanks for your quick reply and suggestions. I followed your instructions. </div><div><br>
</div><div>Here's what I did:</div><div><br></div><div>I removed cygwin and all related files then rebooted PC.</div>
<div>I also removed Rtools.</div><div>I reinstalled Rtools30.exe because I use R version 2.15.3 (2013-03-01) -- "Security Blanket"</div><div>After I adjust my PATH as below:</div><div>C:\R\batchfiles_0.6-6;C:\R\Rtools\bin;C:\R\Rtools\gcc-4.6.3\bin</div>

<div><br></div><div>based on your suggestion, I ran the same code but still getting errors. I restarted my PC  but it did not change anything.  It looks like I am getting a different error this time but it seems to be related to CYGWIN. Please see the below for new error.</div>

<div><br></div><div><br></div><div><div class="im"><div>> # load main two packages</div><div>> library(Rcpp)</div><div>> library(inline)</div><div>> # do something with Rcpp to quickly check that it works</div>
<div>> body <- '</div>
</div><div>+ NumericVector xx(x);</div><div>+ return wrap( std::accumulate( xx.begin(), xx.end(), 0.0));'</div><div class="im"><div>> </div><div>> add <- cxxfunction(signature(x = "numeric"), body, plugin = "Rcpp")</div>

</div><div class="im"><div><b><font color="#ff0000">cygwin warning:</font></b></div><div><b><font color="#ff0000">  MS-DOS style path detected: C:/R/etc/x64/Makeconf</font></b></div><div><b><font color="#ff0000">  Preferred POSIX equivalent is: /cygdrive/c/R/etc/x64/Makeconf</font></b></div>

<div><b><font color="#ff0000">  CYGWIN environment variable option "nodosfilewarning" turns off this warning.</font></b></div><div><b><font color="#ff0000">  Consult the user's guide for more details about POSIX paths:</font></b></div>

<div><b><font color="#ff0000">    <a href="http://cygwin.com/cygwin-ug-net/using.html#using-pathnames" target="_blank">http://cygwin.com/cygwin-ug-net/using.html#using-pathnames</a></font></b></div><div>> </div><div><br>
</div><div><br>
</div></div><div>Am I missing something?</div><div><br></div><div>Thanks for your time.</div><div><br></div><div>Sedat</div><div><div class="h5"><br><div class="gmail_quote">On Fri, Mar 8, 2013 at 1:24 AM, Kevin Ushey <span dir="ltr"><<a href="mailto:kevinushey@gmail.com" target="_blank">kevinushey@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>By default, g++.exe is installed into <Rtools_path>/gcc-<version>/bin; and you want to make sure that folder is in your path (not just C:\R\Rtools\bin, so I guess in your case, assuming an up-to-date version of R/Rtools, you want to make sure C:\R\tools\gcc-4.6.3\bin is also in your path). Note that this is done by default with the Windows installer (it sets the system path rather than the user path). Also, ensure that you have a version of Rtools compatible with the version of R you're using. Finally, make sure you don't have any other (older?) versions of gcc or g++ hiding in a path that's included before the Rtools path. If those versions are getting called rather than the Rtools g++, that could lead to this problem.</div>


<div><br></div><div>-Kevin</div><div><br><div class="gmail_quote"><div><div>On Thu, Mar 7, 2013 at 10:07 PM, Sedat Sen <span dir="ltr"><<a href="mailto:sedatsen06@gmail.com" target="_blank">sedatsen06@gmail.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>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/" target="_blank">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" target="_blank">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" target="_blank">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="line-height:18px;color:rgb(51,51,51);font-size:12px;font-family:Verdana">"Cygwin1.dll Not Found". </b><span style="line-height:18px;color:rgb(51,51,51);font-size:12px;font-family:Verdana">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="line-height:18px;color:rgb(51,51,51);font-size:12px;font-family:Verdana"><br></span></div><div><span style="line-height:18px;color:rgb(51,51,51);font-size:12px;font-family:Verdana"><br>
</span></div><div><span style="line-height:18px;color:rgb(51,51,51);font-size:12px;font-family:Verdana">I am also adding what seems on my PATH </span></div><div><span style="line-height:18px;font-size:12px"><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="line-height:18px;font-size:12px"><font color="#333333" face="Verdana"><br></font></span></div><div><span style="line-height:18px;font-size:12px"><font color="#333333" face="Verdana"><br>
</font></span></div><div><span style="line-height:18px;color:rgb(51,51,51);font-size:12px;font-family:Verdana">Any suggestion?</span></div><span><font color="#888888"><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>
</font></span></div>
<br></div></div>_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><i><span style="font-family:georgia,serif">SS</span><span style="font-family:georgia,serif"><br></span><span style="font-family:georgia,serif"></span></i>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><i><span style="font-family:georgia,serif">SS</span><span style="font-family:georgia,serif"><br></span><span style="font-family:georgia,serif"></span></i>
</div>