Re: [R] R CMD SHLIB help

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed, 13 Feb 2008 09:16:19 +0000 (GMT)

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

______________________________________________
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.
Received on Wed 13 Feb 2008 - 09:20:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 13 Feb 2008 - 09:30:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive