[R] R CMD SHLIB help

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Feb 13 10:16:19 CET 2008


On Tue, 12 Feb 2008, Deepak Chandran wrote:

> Hello,
>
>   I have been having a great deal of difficulty using R CMD SHLIB to
> generate the .so file from my C file. I am using Win XP, and I have
> cygwin installed.

Not surprising: there are no .so objects on Windows.  Also, we don't 
support Cygwin, which also does not have .so objects.  It is not clear if 
you are trying to do this with R built for Windows or for Cygwin (which is 
possible but unsupported).

> I updated to the latest MinGW make files in order to
> get rid of some error. But I still get a few warnings (shown below), and
> no shared file (.so file) produced at the end.
>
> C:\cygwin\home\Deepak>R CMD SHLIB ssa.h
> C:/R/src/gnuwin32/MkRules:235: warning: overriding commands for target
> `.c.d'
> C:/R/src/gnuwin32/MkRules:223: warning: ignoring old commands for target
> `.c.d'
> C:/R/src/gnuwin32/MkRules:255: warning: overriding commands for target
> `.c.o'
> C:/R/src/gnuwin32/MkRules:243: warning: ignoring old commands for target
> `.c.o'

So you have a Makefile locally or a make that is setting .c.o etc rules.

> On another Windows computer (without Cygwin, but has Rtools), I tried
> the same. I get the error:
> c:\R\Rtools\MinGW\bin\windres.exe: _res.rc:8: syntax error
> make: *** [_res.o] Error 1

That looks like a naming problem, but we did ask for a reproducible 
example (see the footer of this and every R-help message and the posting 
guide).  Whilst reading the posting guide, please note what it says about 
using R-devel for programming questions unintelligible to non-programmers, 
and the request for 'at a minimum' sessionInfo output.

> Additionally, there was an error that says "gcc-sjlj" is not found. Is
> this supposed to be "gcc -sjlj"? As a temporary solution I made a copy
> of gcc.exe called gcc-sjlj.exe -- I don't know whether this will cause
> other problems.

Yes, there is, and so you don't have the correct Rtools.

> Thank you very much
>
> ______________________________________________
> 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.

Please DO.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list