[Rd] Installing and compiling C code for R-windows

From: Hartley, Andrew <andrew.hartley_at_metoffice.gov.uk>
Date: Tue, 10 Nov 2009 15:27:42 +0000


Hi r-devers,

This is the first time I've tried to install a package from source on Windows, so please bear with me. I'm trying to install a package written (and tested) by a colleague in C for R on linux, and I am trying to install it on windows following the directions here - http://cran.r-project.org/doc/manuals/R-admin.html#The-Windows-toolset and here - http://www.murdoch-sutherland.com/Rtools/

I installed Rtools (but not InnoSetup or LaTeX because of permissions problems on my PC, although I don't think they are essential). I checked my environment variables are pointing to the correct tools, and then I ran the following:

R CMD INSTALL --library="C:/R/library" --no-chm PP

The package is called PP, and contains the following files:
>ls -R PP

PP:
DESCRIPTION R man src svn-commit.tmp~

PP/R:
PP.R

PP/man:

PP.Rd             pp.get.longs.Rd  pp.ppw.Rd    pp.strip.extra.Rd
pp.close.file.Rd  pp.open.file.Rd  pp.print.Rd  pp.write.Rd
pp.get.lats.Rd    pp.ppa.Rd        pp.read.Rd   tmp

PP/src:
PP.c PP.o PP.so makefile.old

The result is (based on my limited knowledge) quite promising, but it seems to be unable to link libraries. Here's what I get:

I don't have any experience compiling C code, so I'm a bit stumped. Do I need to override the default gcc settings by editing the makefile? Or have I missed something more obvious? Please let me know if you need any additional info.

Kind regards,
Andy

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 10 Nov 2009 - 16:59:44 GMT

This archive was generated by hypermail 2.2.0 : Tue 10 Nov 2009 - 19:30:42 GMT