[R] Loading to R of Fortran DLL

baba@mxr.mesh.ne.jp baba at mxr.mesh.ne.jp
Fri Jan 18 16:48:10 CET 2002


Dear R-ers

Could you tell me how to build DLL from Fortran source and use the DLL in R?

Environments: 
Windows 98
Fortran compiler : DIGITAL Visual Fortran Optimizing Compiler Version: V5.0
R v1.2.3

EXAMPLE SOURCE : FOO.FOR
-------------------------------------
		SUBROUTINE FOO(I,J)
		INTEGER I,J
		I=0
		J=I+1
		END
-------------------------------------

I compiled FOO.FOR with DLL option.

C:\> DF FOO.FOR /DLL
#####
###
####
FOO.DLL

Then, I could build FOO.DLL and used R as follows.

R> print(dyn.load("FOO.DLL"))
NULL
R> 

I could not load FOO.DLL. I am not sure whether FOO.DLL is bad or not.

Could you tell me how to build DLL in Visual Fortran or another fortran compiler on Windows?
I will appreciate it, if you give me a sample Fortran code and any advice to build and use DLL. 

Best Regards,
Baba


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list