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")
}


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?

Note: The compilation takes so little time relative to the use of the
package that it's no big deal to call SHLIB every time.


Thanks in advance,
Anand Patil

	[[alternative HTML version deleted]]

