[R] Fortran DLL

Alex Randriamiharisoa Alex.Randriamiharisoa at inst.hospvd.ch
Fri May 23 11:16:14 CEST 2003


Dear R-users,
After the reading of "Writing R extensions", "readme.packages", "Using 
external compilers with
R", ...,  I have tried to create a DLL for my Fortran file using the command:

g77 --shared -o robeth.dll robeth.f

and failed with several messages as :
c:\temp/ccU8N5fb.o: ...  undefined reference to 'realpr_'
c:\temp/ccU8N5fb.o: ...  undefined reference to 'dblepr_'
c:\temp/ccU8N5fb.o: ...  undefined reference to 'intpr_'
c:\temp/ccU8N5fb.o: ...  undefined reference to 'rexit_'

What I have missed. If I insert #include <R.h> at the top of the file, the 
MinGW
g77 compiler exits immediately =>  "undefined or invalid # directives"

I've tested on  R Version 1.5.1 and 1.7.0, for windows. If a special 
library is needed,
someone could send it to me by mail.
Thanks for your help.
Alex R.




More information about the R-help mailing list