[R] SHLIB problem under Vista
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Sep 20 09:31:57 CEST 2007
This is a known problem with your compiler installation, discussed in the
R-admin manual. From the version in R-patched:
There are known problems with one of the compilers sets in this toolset
on Windows Vista: see the workaround below. (With that workaround it has
been used on both 32- and 64-bit versions of Vista.)
...
On Vista systems you will need to add
c:\Rtools\MinGW\libexec\gcc\mingw\3.4.5
to the path.
This is not relevant to the recommended compiler set for R 2.6.0.
On Wed, 19 Sep 2007, Anand Patil wrote:
> Hi all,
>
>
> I'd like to distribute an R package that compiles some (small) C functions
> every time it's sourced. The relevant code in the top level R script is as
> follows:
>
> system("R CMD SHLIB Selma_extensions.c")
> if (.Platform$OS.type=="windows") {
> slash = '\\'
> dyn.load("Selma_extensions.dll")
> }
> if (.Platform$OS.type=="unix") {
> slash = '/'
> dyn.load("Selma_extensions.so")
> }
Hmm, all the information you need is already in .Platform, $file.sep and
$dynlib.ext: the latter varies by OS.type.
> This works fine on a Mac, but I tried it under Windows Vista, after
> installing RTools and telling it to put itself on the system path, and got
> the following:
>
> making Selma_extensions.d from Selma_extensions.c
> gcc.exe: installation problem, cannot exec `cc1': No such file or directory
> make: *** [Selma_extensions.d] Error 1
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
> unable to load shared library
> 'C:/Users/anand/Desktop/Selma/Selma_extensions.dll':
> LoadLibrary failure: The specified module could not be found.
>
> Can this be fixed without requiring the user to do anything?
The fix requires 'the user' to read the documentation.
--
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