Further to my earlier request for help (see below): I should have
said what operating system and compiler I am using.
I am working with the (mingw) g77 compiler under Windows 2000, and
following the approach outlined in Venables & Ripley's "S
Programming", p243. That is, with my Fortran code in testit.f, I say
g77 -O2 -c testit.f
dllwrap -o testit.dll --export-all-symbols testit.o
which works fine when I don't have any print statements in testit.f,
but if for example I call INTPR in testit.f the dllwrap step fails
with the complaint
undefined reference to `intpr_'
dllwrap: gcc exited with status 1
Any hints will be much appreciated. As I said earlier, I am just
beginning with this.
David
>I am making my first attempts at using some Fortran code with R, and
>so far it's going OK. To print from my Fortran programs, it seems I
>need subroutines dblepr, realpr and intpr. From the excellent
>"Writing R Extensions" document:
>
>"Three subroutines are provided to ease the output of information
>from FORTRAN code.
>
> subroutine dblepr(label, nchar, data, ndata)
> subroutine realpr(label, nchar, data, ndata)
> subroutine intpr (label, nchar, data, ndata)"
>
>Where can one find these subroutines?
>
>David
--
David Firth Phone +44 1865 278544
Nuffield College Fax +44 1865 278621
Oxford OX1 1NF Secretary +44 1865 278553
United Kingdom Email david.firth at nuffield.ox.ac.uk
http://www.stats.ox.ac.uk/~firth/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
https://stat.ethz.ch/pipermail/r-help/attachments/20010509/e6fc5d20/attachment.html