<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 29, 2014 at 9:39 AM, Jamie Olson <span dir="ltr"><<a href="mailto:jamie.f.olson@gmail.com" target="_blank">jamie.f.olson@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi all,<br>
I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries<br>
in an R package.  I need it to work in Windows, though, and I'm<br>
struggling to get things working.<br>
<br>--- >8---<br></blockquote><div><br></div><div>It might help to state what c/c++ libraries you're trying to get up and running.   There is some documentation in RTools (IIRC) on setting up an RTOOLS_LOCAL encironment that was pretty straight forward.  I had success building the libraries for GMP, MPFR, and such using mingw-64 then placing the resulting files in an RToolsLocal directory.  If you go that route you should be able to use cmake to build and then install into your LOCAL path.</div>
<div><br></div><div>Or, are you trying to have this cmake be part of a package that you are creating?</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

The native CMake refuses to use the Rtools gcc with MinGW Makefiles<br>
<br></blockquote><div><br></div><div>This doesn't surprise me at all, as the RTools toolchain requires that the environment is setup, which it is when calling _from_ R.  You'd have to figure out how to do that manually if you want to use that g++ from else where (say msys).  It can be done, but as you mention...</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">--->8---<br>
<br>The documentation[<a href="http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW_002dw64-toolchain" target="_blank">http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW_002dw64-toolchain</a>]<br>
states:<br>
Users developing packages with Rcpp need to ensure that they use a<br>
version built with exactly the same toolchain as their package: the<br>
recommendation is to build Rcpp from its sources yourself.<br>
<br>
Do I simply need to install Rcpp from source using my target compiler?<br>
 Will that effect my ability to use the binary package on other<br>
systems(with CRAN Rcpp)?<br>
<br></blockquote><div> </div><div>You _can_ install Rcpp from source on windows using a recent msys environment with a recent g++ ( I did last December ).  But there be dragons down that road!  You have to make sure that you get all of the settings correct and all of that jazz, which is a major pain; and then you are still going to have problems unless you can figure out the proper procedure for getting the unwinding info correct, and the cross boundary communication between libraries correct or you will end up freezing R with every error your code produces.  I would've kept with a g++ 4.8.2 or clang 3.4 if it wasn't for the fact that I couldn't get any graceful exception handling.</div>
<div><br></div><div>I know I make it sound bad.  That is on purpose!  You said you are a relative beginner...  I'm someone who likes to 'just dive in'; and I can tell you that I dove in right where you are standing and you're gonna your head if you do it that way.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">--->8---<br>
<br>
Thanks for any help you can offer,<br>
--Jamie<br>
<span class=""><font color="#888888"><br>
<br>
Jamie Olson<br>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">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>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Sincerely,<br>Thell
</div></div>