Hi

I've built a dll using Fortran code and can call it by either R or 
Fortran. Calling by the former gives me the wrong answer and the later
gives the correct answer.

>From what I've read, it looks like I should use the subroutines DBLEPR, 
INTPR and REALPR to print to the R console rather than using Fortran 
standard I/O and that if I use the command 
R CMD SHLIB source.f that these subroutines will automatically be found 
(Please correct me if I'm wrong about any of this). The problem is that I 
have to specify the gfortran compiler option -fno-range-check in order for 
my code to compile. I've tried setting PKG_FCFLAGS=-fno-range-check in a 
file named Makevars under the same directory as my Fortran files but this 
doesn't seem to be the right place because R CMD SHLIB still produces 
error messages related to integer overflow (the same error as when I run 
gfortran -c MRPP.f90 as opposed to gfortran -c MRPP.f90 -fno-range-check) 
when I type

R CMD SHLIB MRPP.f90. 

So I was wondering if anyone could tell me how compiler option should be 
specified when using R CMD SHLIB?

I appreciate the help. 
 
Marian K Talbert
ASRC Management Servics
Contracted To:
US Geological Survey
Fort Collins Science Center 
2150 Centre Ave., Bldg C
Fort Collins, CO 80526
Phone: 970-226-9108
        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to