[R] question about Rcmd SHLIB

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Oct 17 23:58:16 CEST 2004


On Sun, 17 Oct 2004, Liqiang Ni wrote:

> Yes. I think I followed readme.packages advice about mingw, perl etc. I
> am using R 1.8.1. Here is another experiment I just ran. It was

Isn't it time you updated your R?  Have you seem how many bugs have been 
fixed since 1.8.1?

> successful.
> 
> C:\Fu>Rcmd SHLIB lasso.f
> gcc  --shared -s  -o lasso.dll lasso.def lasso.a 
> -LC:/PROGRA~1/R/rw1081/src/gnu
> win32  -lg2c -lR
> 
> But if I ran one of the two fortran files I wanted to created a shared
> object .dll, it does not work. 

Please note, it *did* work, as cox.dll was created as it should have been.  
There is a spurious error message caused by a file called all.something in
that directory.

> C:\lasso>Rcmd SHLIB cox.f
> g77 -O2 -Wall   -c cox.f -o cox.o
> cox.f: In subroutine `initcx':
> cox.f:3: warning: unused variable `p'
> cox.f: In function `linvc':
> cox.f:182: warning: `linvc' might be used uninitialized in this
> function
> cox.f: In function `weigtc':
> cox.f:186: warning: `weigtc' might be used uninitialized in this
> function
> cox.f: In function `dirivc':
> cox.f:190: warning: `dirivc' might be used uninitialized in this
> function
> ar cr cox.a *.o
> ranlib cox.a
> gcc  --shared -s  -o cox.dll cox.def cox.a 
> -LC:/PROGRA~1/R/rw1081/src/gnuwin32
>  -lg2c -lR
> f77 -O2 -Wall    all.f libR makeMakedeps cox.dll   -o all
> make: *** [all] Error 255


-- 
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