[R] Compiling C-code in Windows

Mike Marchywka marchywka at hotmail.com
Tue May 31 18:24:20 CEST 2011





----------------------------------------
> Date: Tue, 31 May 2011 11:37:56 -0400
> From: murdoch.duncan at gmail.com
> To: tom.osborn at iinet.net.au
> CC: r-help at stat.math.ethz.ch; pmilin at ff.uns.ac.rs

>
> On 31/05/2011 7:50 AM, Tom Osborn wrote:
> > You could use cygwin's cc/gcc, or the Watcom opensource compiler.
>
> Neither of those is supported. Use what the R Admin manual suggests, or
> you're on your own.

I have had fairly good luck with cygwin or mingw but you may need to
have a few conditionals etc. Not sure what R suggests but cygwin should
work.


>
> Duncan Murdoch
>
> > [Watcom used to be a commercial compiler which ceased and has
> > become an open project].
> >
> > But listen to people who've experienced the options. [Not I].
> >
> > Cheers, Tom.
> > ----- Original Message -----
> > From: Petar Milin
> > To: R-HELP
> > Sent: Tuesday, May 31, 2011 9:43 PM

> >
> >
> > Hello ALL!
> > I am an Linux user (Debian testing i386), with very dusty
> > Win-experience. Nevertheless, my colleagues and I are making some
> > package in R, and I built C-routines to speed up things.
> > I followed instruction how to compile C for R (very useful link:
> > http://www.stat.lsa.umich.edu/~yizwang/software/maxLinear/noteonR.html,
> > and links listed there). Everything works like a charm in Linux. I have
> > *.so and wrapper function from R is doing a right call.
> > However, I wanted to make *.dll library for Win-users. Now, I used my
> > colleague's computer with Win XP on it, and with the latest R. In MS-DOS
> > console, I positioned prompt in 'C;\Program Files\R\R-2.13.0\bin\i386\',
> > and then I run: 'R CMD SHLIB C:\trial.c'. However, nothing happened, no
> > trial.dll, nothing. Then, I tried with: 'R CMD SHLIB --output=trial.dll
> > C:\trial.c', but no luck, again.
> > Please, can anyone help me with this? Can I use: 'R CMD SHLIB
> > --output=trial.dll C:\trial.c' under Linux, and expecting working DLL?
> >
> > Best,
> > PM
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code. 		 	   		  


More information about the R-help mailing list