Fortran vs C, easing using Fortran

Albrecht Gebhardt albrecht.gebhardt@uni-klu.ac.at
Mon, 12 Apr 1999 11:30:20 +0200 (MET DST)


On Sun, 11 Apr 1999, Prof Brian D Ripley wrote:

>
> ... some lines deleted ...
>
> 3) The problem is finding the external calls from Fortran code. In the base
> code this should be not problem now we use the Fortran front-end to link.  
> I have problems with quite a few packages that use Fortran, and have
> translated some code myself just to avoid those. (It was a big problem in
> the first release of MASS software for S-PLUS, and we removed all the 
> Fortran to save ourselves the hastle of `it won't work on my XYZ system'
> reports. We never made the Fortran work on HPs, whose Fortran name space
> clashes with the C one, and it seemed that S had already grabbed some
> critical symbols as C ones.)
> 
> I think in R we can do better than at present, if only I knew
> exactly how. One idea is to have (effectively) a `hints' file that
> configure uses to add a base set of libraries to FLIBS, but on Solaris
> at least, using the Fortran command (f77 or g77) to link a dynamic library
> does the job.  For linking with ld the base FLIBS would need to be
> 
> -lF77 -lM77 -lV77 -lsunmath -lm
> 
> _if_ f77 is used.  How viable is `use FC to link' on other platforms?
> 

I'm not sure if it does matter here, but the only way to build R on my
Alphas currently is using Fortran as LDCMD:

in config.site:
LDCMD="f77 -g -nofor_main -fpe3 "

SHLIBLD is "ld -shared -expect_unresolved '*'".



Albrecht

-------------------------------------------------------------------------------
Albrecht Gebhardt                   email   : albrecht.gebhardt@uni-klu.ac.at
Institut fuer Mathematik            Tel.    : (++43 463) 2700/837
Universitaet Klagenfurt             Fax     : (++43 463) 2700/834
Villacher Str. 161
A-9020 Klagenfurt, Austria
-------------------------------------------------------------------------------


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._