[R] question about Rcmd SHLIB
Liqiang Ni
lni at mail.ucf.edu
Mon Oct 18 01:49:55 CEST 2004
Thanks, Prof Ripley. I changed the file name and it works just fine.
Liqiang Ni
Assistant Professor,
Department of Statistics, University of Central Florida,
Orlando, FL 32816-2370 Email: lni at mail.ucf.edu
>>> Prof Brian Ripley <ripley at stats.ox.ac.uk> 10/17/2004 5:29:47 PM
>>>
On Sun, 17 Oct 2004 16:08:04 -0400, "Liqiang Ni" <lni at mail.ucf.edu>
wrote:
>I tried to create a shared library in Windows XP. However I got error
>messages which attached below:
>
>C:\lasso>Rcmd SHLIB all.f cox.f
>gcc all.o libR makeMakedeps all.dll -o all
>gcc.exe: libR: No such file or directory
>gcc.exe: makeMakedeps: No such file or directory
>make: *** [all] Error 1
>
>I have created shard libraries successfully before. Also for the same
>fortran files: all.f cox.f, I can create the object all.so
successfully
>in Linux using R SHLIB. Any suggestion? Thanks.
The problem is the name all.f. Try another name.
`all' is a target in the Makefile and some implicit rule is being
triggered. Given that no one has reported this in all the years it
has
been done this way, it just seems an unlucky choice of name. Adding
.PHONY : all libR makeMakedeps
to src/gnuwin32/MakeDll will fix it, at least with my make.
Incidentally, it would have helped if you had given the correct output,
which was something like
[c:/R/svn/trunk/src/gnuwin32/tmp]% rcmd SHLIB all.f cox.f
g77 -O2 -Wall -c all.f -o all.o
g77 -O2 -Wall -c cox.f -o cox.o
ar cr all.a all.o cox.o
ranlib all.a
gcc --shared -s -o all.dll all.def all.a
-Lc:/R/svn/trunk/src/gnuwin32
-lg2c -lR
gcc all.o libR makeMakedeps all.dll -o all
gcc.exe: libR: No such file or directory
gcc.exe: makeMakedeps: No such file or directory
make: *** [all] Error 1
so this did in fact work! I think the output given is from a second
run.
--
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