I'm trying to build the Avro-C library[http://avro.apache.org/docs/1.7.5/api/c/index.html]. There is a README for building in windows[http://svn.apache.org/repos/asf/avro/trunk/lang/c/README.maintaining_win32.txt] but it only has instructions for Visual Studio. I've recently been wondering if that was intentional, since now cmake-generated MSYS Makefiles are giving errors.
Are you suggesting that I build the library with MinGW(in cygwin/linux?) and then just copy it to link to when building the package with Rcpp? Jamie Olson On Wed, Jan 29, 2014 at 2:07 PM, Thell Fowler <[email protected]> wrote: > > > > On Wed, Jan 29, 2014 at 9:39 AM, Jamie Olson <[email protected]> > wrote: >> >> Hi all, >> I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries >> in an R package. I need it to work in Windows, though, and I'm >> struggling to get things working. >> >> --- >8--- > > > 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. > > Or, are you trying to have this cmake be part of a package that you are > creating? > > >> The native CMake refuses to use the Rtools gcc with MinGW Makefiles >> > > 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... > >> --->8--- >> >> >> The >> documentation[http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW_002dw64-toolchain] >> states: >> Users developing packages with Rcpp need to ensure that they use a >> version built with exactly the same toolchain as their package: the >> recommendation is to build Rcpp from its sources yourself. >> >> Do I simply need to install Rcpp from source using my target compiler? >> Will that effect my ability to use the binary package on other >> systems(with CRAN Rcpp)? >> > > 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. > > 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. > > >> --->8--- >> >> >> Thanks for any help you can offer, >> --Jamie >> >> >> Jamie Olson >> >> _______________________________________________ >> Rcpp-devel mailing list >> [email protected] >> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel > > > > > -- > Sincerely, > Thell _______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
